git.delta.rocks / unique-network / refs/commits / 295de97207bc

difftreelog

Merge pull request #109 from usetech-llc/release/v2.0.0

str-mv2021-02-18parents: #7fa5eef #6ea0c80.patch.diff
in: master
Release/v2.0.0

128 files changed

added.devcontainer/Dockerfilediffbeforeafterboth

no changes

added.devcontainer/devcontainer.jsondiffbeforeafterboth

no changes

modified.dockerignorediffbeforeafterboth
3doc/3doc/
4target/4target/
5chain-data*/5chain-data*/
6smart_contract/6smart_contract/
7
added.github/workflows/notify.ymldiffbeforeafterboth

no changes

modified.gitignorediffbeforeafterboth
10einstein_key_file10einstein_key_file
11*store_key*.json11*store_key*.json
1212
13/.idea/13/.idea/
14
15tests/.vscode
modifiedCargo.lockdiffbeforeafterboth
1212
13[[package]]13[[package]]
14name = "addr2line"14name = "addr2line"
15version = "0.13.0"15version = "0.14.1"
16source = "registry+https://github.com/rust-lang/crates.io-index"16source = "registry+https://github.com/rust-lang/crates.io-index"
17checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072"17checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7"
18dependencies = [18dependencies = [
19 "gimli",19 "gimli 0.23.0",
20]20]
2121
22[[package]]22[[package]]
26checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"26checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
2727
28[[package]]28[[package]]
29name = "adler32"
30version = "1.1.0"
31source = "registry+https://github.com/rust-lang/crates.io-index"
32checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d"
33
34[[package]]
35name = "aead"29name = "aead"
36version = "0.3.2"30version = "0.3.2"
37source = "registry+https://github.com/rust-lang/crates.io-index"31source = "registry+https://github.com/rust-lang/crates.io-index"
38checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331"32checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331"
39dependencies = [33dependencies = [
40 "generic-array 0.14.3",34 "generic-array 0.14.4",
41]35]
4236
43[[package]]37[[package]]
44name = "aes"38name = "aes"
45version = "0.4.0"39version = "0.5.0"
46source = "registry+https://github.com/rust-lang/crates.io-index"40source = "registry+https://github.com/rust-lang/crates.io-index"
47checksum = "f7001367fde4c768a19d1029f0a8be5abd9308e1119846d5bd9ad26297b8faf5"41checksum = "dd2bc6d3f370b5666245ff421e231cba4353df936e26986d2918e61a8fd6aef6"
48dependencies = [42dependencies = [
49 "aes-soft",43 "aes-soft",
50 "aesni",44 "aesni",
5347
54[[package]]48[[package]]
55name = "aes-gcm"49name = "aes-gcm"
56version = "0.6.0"50version = "0.7.0"
57source = "registry+https://github.com/rust-lang/crates.io-index"51source = "registry+https://github.com/rust-lang/crates.io-index"
58checksum = "86f5007801316299f922a6198d1d09a0bae95786815d066d5880d13f7c45ead1"52checksum = "0301c9e9c443494d970a07885e8cf3e587bae8356a1d5abd0999068413f7205f"
59dependencies = [53dependencies = [
60 "aead",54 "aead",
61 "aes",55 "aes",
62 "block-cipher",56 "block-cipher",
63 "ghash",57 "ghash",
64 "subtle 2.2.3",58 "subtle 2.4.0",
65]59]
6660
67[[package]]61[[package]]
68name = "aes-soft"62name = "aes-soft"
69version = "0.4.0"63version = "0.5.0"
70source = "registry+https://github.com/rust-lang/crates.io-index"64source = "registry+https://github.com/rust-lang/crates.io-index"
71checksum = "4925647ee64e5056cf231608957ce7c81e12d6d6e316b9ce1404778cc1d35fa7"65checksum = "63dd91889c49327ad7ef3b500fd1109dbd3c509a03db0d4a9ce413b79f575cb6"
72dependencies = [66dependencies = [
73 "block-cipher",67 "block-cipher",
74 "byteorder",68 "byteorder",
75 "opaque-debug 0.2.3",69 "opaque-debug 0.3.0",
76]70]
7771
78[[package]]72[[package]]
79name = "aesni"73name = "aesni"
80version = "0.7.0"74version = "0.8.0"
81source = "registry+https://github.com/rust-lang/crates.io-index"75source = "registry+https://github.com/rust-lang/crates.io-index"
82checksum = "d050d39b0b7688b3a3254394c3e30a9d66c41dcf9b05b0e2dbdc623f6505d264"76checksum = "0a6fe808308bb07d393e2ea47780043ec47683fcf19cf5efc8ca51c50cc8c68a"
83dependencies = [77dependencies = [
84 "block-cipher",78 "block-cipher",
85 "opaque-debug 0.2.3",79 "opaque-debug 0.3.0",
86]80]
8781
88[[package]]82[[package]]
89name = "ahash"83name = "ahash"
90version = "0.2.18"84version = "0.4.7"
91source = "registry+https://github.com/rust-lang/crates.io-index"85source = "registry+https://github.com/rust-lang/crates.io-index"
92checksum = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3"86checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e"
93dependencies = [
94 "const-random",
95]
9687
97[[package]]88[[package]]
98name = "aho-corasick"89name = "aho-corasick"
99version = "0.7.13"90version = "0.7.15"
100source = "registry+https://github.com/rust-lang/crates.io-index"91source = "registry+https://github.com/rust-lang/crates.io-index"
101checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86"92checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
102dependencies = [93dependencies = [
103 "memchr",94 "memchr",
104]95]
10596
106[[package]]97[[package]]
107name = "alga"
108version = "0.9.3"
109source = "registry+https://github.com/rust-lang/crates.io-index"
110checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2"
111dependencies = [
112 "approx",
113 "num-complex",
114 "num-traits 0.2.12",
115]
116
117[[package]]
118name = "ansi_term"98name = "ansi_term"
119version = "0.11.0"99version = "0.11.0"
120source = "registry+https://github.com/rust-lang/crates.io-index"100source = "registry+https://github.com/rust-lang/crates.io-index"
134114
135[[package]]115[[package]]
136name = "anyhow"116name = "anyhow"
137version = "1.0.31"117version = "1.0.38"
138source = "registry+https://github.com/rust-lang/crates.io-index"118source = "registry+https://github.com/rust-lang/crates.io-index"
139checksum = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f"119checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1"
140120
141[[package]]121[[package]]
142name = "approx"122name = "approx"
143version = "0.3.2"123version = "0.3.2"
144source = "registry+https://github.com/rust-lang/crates.io-index"124source = "registry+https://github.com/rust-lang/crates.io-index"
145checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3"125checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3"
146dependencies = [126dependencies = [
147 "num-traits 0.2.12",127 "num-traits",
148]128]
149129
150[[package]]130[[package]]
151name = "arc-swap"
152version = "0.4.7"
153source = "registry+https://github.com/rust-lang/crates.io-index"
154checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034"
155
156[[package]]
157name = "arrayref"131name = "arrayref"
158version = "0.3.6"132version = "0.3.6"
159source = "registry+https://github.com/rust-lang/crates.io-index"133source = "registry+https://github.com/rust-lang/crates.io-index"
170144
171[[package]]145[[package]]
172name = "arrayvec"146name = "arrayvec"
173version = "0.5.1"147version = "0.5.2"
174source = "registry+https://github.com/rust-lang/crates.io-index"148source = "registry+https://github.com/rust-lang/crates.io-index"
175checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"149checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
176150
177[[package]]151[[package]]
178name = "asn1_der"152name = "asn1_der"
189source = "registry+https://github.com/rust-lang/crates.io-index"163source = "registry+https://github.com/rust-lang/crates.io-index"
190checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502"164checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502"
191dependencies = [165dependencies = [
192 "quote 1.0.7",166 "quote",
193 "syn 1.0.34",167 "syn",
194]168]
195169
196[[package]]170[[package]]
197name = "assert_matches"171name = "async-channel"
198version = "1.3.0"172version = "1.5.1"
199source = "registry+https://github.com/rust-lang/crates.io-index"173source = "registry+https://github.com/rust-lang/crates.io-index"
200checksum = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5"174checksum = "59740d83946db6a5af71ae25ddf9562c2b176b2ca42cf99a455f09f4a220d6b9"
175dependencies = [
176 "concurrent-queue",
177 "event-listener",
178 "futures-core",
179]
201180
202[[package]]181[[package]]
182name = "async-executor"
183version = "1.4.0"
184source = "registry+https://github.com/rust-lang/crates.io-index"
185checksum = "eb877970c7b440ead138f6321a3b5395d6061183af779340b65e20c0fede9146"
186dependencies = [
187 "async-task",
188 "concurrent-queue",
189 "fastrand",
190 "futures-lite",
191 "once_cell",
192 "vec-arena",
193]
194
195[[package]]
196name = "async-global-executor"
197version = "2.0.2"
198source = "registry+https://github.com/rust-lang/crates.io-index"
199checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6"
200dependencies = [
201 "async-channel",
202 "async-executor",
203 "async-io",
204 "async-mutex",
205 "blocking",
206 "futures-lite",
207 "num_cpus",
208 "once_cell",
209]
210
211[[package]]
212name = "async-io"
213version = "1.3.1"
214source = "registry+https://github.com/rust-lang/crates.io-index"
215checksum = "9315f8f07556761c3e48fec2e6b276004acf426e6dc068b2c2251854d65ee0fd"
216dependencies = [
217 "concurrent-queue",
218 "fastrand",
219 "futures-lite",
220 "libc",
221 "log",
222 "nb-connect",
223 "once_cell",
224 "parking",
225 "polling",
226 "vec-arena",
227 "waker-fn",
228 "winapi 0.3.9",
229]
230
231[[package]]
232name = "async-lock"
233version = "2.3.0"
234source = "registry+https://github.com/rust-lang/crates.io-index"
235checksum = "1996609732bde4a9988bc42125f55f2af5f3c36370e27c778d5191a4a1b63bfb"
236dependencies = [
237 "event-listener",
238]
239
240[[package]]
241name = "async-mutex"
242version = "1.4.0"
243source = "registry+https://github.com/rust-lang/crates.io-index"
244checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e"
245dependencies = [
246 "event-listener",
247]
248
249[[package]]
250name = "async-process"
251version = "1.0.2"
252source = "registry+https://github.com/rust-lang/crates.io-index"
253checksum = "ef37b86e2fa961bae5a4d212708ea0154f904ce31d1a4a7f47e1bbc33a0c040b"
254dependencies = [
255 "async-io",
256 "blocking",
257 "cfg-if 1.0.0",
258 "event-listener",
259 "futures-lite",
260 "once_cell",
261 "signal-hook",
262 "winapi 0.3.9",
263]
264
265[[package]]
203name = "async-std"266name = "async-std"
204version = "1.5.0"267version = "1.9.0"
205source = "registry+https://github.com/rust-lang/crates.io-index"268source = "registry+https://github.com/rust-lang/crates.io-index"
206checksum = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267"269checksum = "d9f06685bad74e0570f5213741bea82158279a4103d988e57bfada11ad230341"
207dependencies = [270dependencies = [
208 "async-task",271 "async-channel",
209 "broadcaster",272 "async-global-executor",
210 "crossbeam-channel",273 "async-io",
211 "crossbeam-deque",274 "async-lock",
212 "crossbeam-utils",275 "async-process",
276 "crossbeam-utils 0.8.1",
277 "futures-channel",
213 "futures-core",278 "futures-core",
214 "futures-io",279 "futures-io",
215 "futures-timer 2.0.2",280 "futures-lite",
281 "gloo-timers",
216 "kv-log-macro",282 "kv-log-macro",
217 "log",283 "log",
218 "memchr",284 "memchr",
219 "mio",
220 "mio-uds",
221 "num_cpus",285 "num_cpus",
222 "once_cell",286 "once_cell",
223 "pin-project-lite",287 "pin-project-lite 0.2.4",
224 "pin-utils",288 "pin-utils",
225 "slab",289 "slab",
290 "wasm-bindgen-futures",
226]291]
227292
228[[package]]293[[package]]
229name = "async-task"294name = "async-task"
230version = "1.3.1"295version = "4.0.3"
231source = "registry+https://github.com/rust-lang/crates.io-index"296source = "registry+https://github.com/rust-lang/crates.io-index"
232checksum = "0ac2c016b079e771204030951c366db398864f5026f84a44dafb0ff20f02085d"297checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0"
298
299[[package]]
300name = "async-trait"
301version = "0.1.42"
302source = "registry+https://github.com/rust-lang/crates.io-index"
303checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d"
233dependencies = [304dependencies = [
234 "libc",305 "proc-macro2",
235 "winapi 0.3.9",306 "quote",
307 "syn",
236]308]
237309
238[[package]]310[[package]]
239name = "async-tls"311name = "asynchronous-codec"
240version = "0.7.0"312version = "0.5.0"
241source = "registry+https://github.com/rust-lang/crates.io-index"313source = "registry+https://github.com/rust-lang/crates.io-index"
242checksum = "95fd83426b89b034bf4e9ceb9c533c2f2386b813fd3dcae0a425ec6f1837d78a"314checksum = "fb4401f0a3622dad2e0763fa79e0eb328bc70fb7dccfdd645341f00d671247d6"
243dependencies = [315dependencies = [
244 "futures 0.3.5",316 "bytes 1.0.1",
245 "rustls",317 "futures-sink",
246 "webpki",318 "futures-util",
247 "webpki-roots 0.19.0",319 "memchr",
320 "pin-project-lite 0.2.4",
248]321]
249322
250[[package]]323[[package]]
324name = "asynchronous-codec"
325version = "0.6.0"
326source = "registry+https://github.com/rust-lang/crates.io-index"
327checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690"
328dependencies = [
329 "bytes 1.0.1",
330 "futures-sink",
331 "futures-util",
332 "memchr",
333 "pin-project-lite 0.2.4",
334]
335
336[[package]]
337name = "atomic"
338version = "0.5.0"
339source = "registry+https://github.com/rust-lang/crates.io-index"
340checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281"
341dependencies = [
342 "autocfg",
343]
344
345[[package]]
346name = "atomic-waker"
347version = "1.0.0"
348source = "registry+https://github.com/rust-lang/crates.io-index"
349checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a"
350
351[[package]]
251name = "atty"352name = "atty"
252version = "0.2.14"353version = "0.2.14"
253source = "registry+https://github.com/rust-lang/crates.io-index"354source = "registry+https://github.com/rust-lang/crates.io-index"
260361
261[[package]]362[[package]]
262name = "autocfg"363name = "autocfg"
263version = "0.1.7"364version = "1.0.1"
264source = "registry+https://github.com/rust-lang/crates.io-index"365source = "registry+https://github.com/rust-lang/crates.io-index"
265checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"366checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
266367
267[[package]]368[[package]]
268name = "autocfg"
269version = "1.0.0"
270source = "registry+https://github.com/rust-lang/crates.io-index"
271checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
272
273[[package]]
274name = "backtrace"369name = "backtrace"
275version = "0.3.50"370version = "0.3.56"
276source = "registry+https://github.com/rust-lang/crates.io-index"371source = "registry+https://github.com/rust-lang/crates.io-index"
277checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293"372checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc"
278dependencies = [373dependencies = [
279 "addr2line",374 "addr2line",
280 "cfg-if",375 "cfg-if 1.0.0",
281 "libc",376 "libc",
282 "miniz_oxide",377 "miniz_oxide",
283 "object",378 "object 0.23.0",
284 "rustc-demangle",379 "rustc-demangle",
285]380]
286381
292387
293[[package]]388[[package]]
294name = "base64"389name = "base64"
295version = "0.11.0"390version = "0.12.3"
296source = "registry+https://github.com/rust-lang/crates.io-index"391source = "registry+https://github.com/rust-lang/crates.io-index"
297checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"392checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
298393
299[[package]]394[[package]]
395name = "base64"
396version = "0.13.0"
397source = "registry+https://github.com/rust-lang/crates.io-index"
398checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
399
400[[package]]
401name = "bincode"
402version = "1.3.1"
403source = "registry+https://github.com/rust-lang/crates.io-index"
404checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d"
405dependencies = [
406 "byteorder",
407 "serde",
408]
409
410[[package]]
300name = "bindgen"411name = "bindgen"
301version = "0.53.3"412version = "0.54.0"
302source = "registry+https://github.com/rust-lang/crates.io-index"413source = "registry+https://github.com/rust-lang/crates.io-index"
303checksum = "c72a978d268b1d70b0e963217e60fdabd9523a941457a6c42a7315d15c7e89e5"414checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36"
304dependencies = [415dependencies = [
305 "bitflags",416 "bitflags",
306 "cexpr",417 "cexpr",
307 "cfg-if",418 "cfg-if 0.1.10",
308 "clang-sys",419 "clang-sys",
309 "clap",420 "clap",
310 "env_logger",421 "env_logger",
313 "log",424 "log",
314 "peeking_take_while",425 "peeking_take_while",
315 "proc-macro2",426 "proc-macro2",
316 "quote 1.0.7",427 "quote",
317 "regex",428 "regex",
318 "rustc-hash",429 "rustc-hash",
319 "shlex",430 "shlex",
320 "which",431 "which 3.1.1",
321]432]
322433
323[[package]]434[[package]]
327checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"438checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
328439
329[[package]]440[[package]]
330name = "bitmask"
331version = "0.5.0"
332source = "registry+https://github.com/rust-lang/crates.io-index"
333checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead"
334
335[[package]]
336name = "bitvec"441name = "bitvec"
337version = "0.17.4"442version = "0.17.4"
338source = "registry+https://github.com/rust-lang/crates.io-index"443source = "registry+https://github.com/rust-lang/crates.io-index"
344449
345[[package]]450[[package]]
346name = "blake2"451name = "blake2"
347version = "0.8.1"452version = "0.9.1"
348source = "registry+https://github.com/rust-lang/crates.io-index"453source = "registry+https://github.com/rust-lang/crates.io-index"
349checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330"454checksum = "10a5720225ef5daecf08657f23791354e1685a8c91a4c60c7f3d3b2892f978f4"
350dependencies = [455dependencies = [
351 "byte-tools",
352 "crypto-mac 0.7.0",
353 "digest 0.8.1",
354 "opaque-debug 0.2.3",
355]
356
357[[package]]
358name = "blake2"
359version = "0.9.0"
360source = "registry+https://github.com/rust-lang/crates.io-index"
361checksum = "84ce5b6108f8e154604bd4eb76a2f726066c3464d5a552a4229262a18c9bb471"
362dependencies = [
363 "byte-tools",
364 "byteorder",
365 "crypto-mac 0.8.0",456 "crypto-mac 0.8.0",
366 "digest 0.9.0",457 "digest 0.9.0",
367 "opaque-debug 0.2.3",458 "opaque-debug 0.3.0",
368]459]
369460
370[[package]]461[[package]]
379470
380[[package]]471[[package]]
381name = "blake2b_simd"472name = "blake2b_simd"
382version = "0.5.10"473version = "0.5.11"
383source = "registry+https://github.com/rust-lang/crates.io-index"474source = "registry+https://github.com/rust-lang/crates.io-index"
384checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a"475checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587"
385dependencies = [476dependencies = [
386 "arrayref",477 "arrayref",
387 "arrayvec 0.5.1",478 "arrayvec 0.5.2",
388 "constant_time_eq",479 "constant_time_eq",
389]480]
390481
391[[package]]482[[package]]
392name = "blake2s_simd"
393version = "0.5.10"
394source = "registry+https://github.com/rust-lang/crates.io-index"
395checksum = "ab9e07352b829279624ceb7c64adb4f585dacdb81d35cafae81139ccd617cf44"
396dependencies = [
397 "arrayref",
398 "arrayvec 0.5.1",
399 "constant_time_eq",
400]
401
402[[package]]
403name = "block-buffer"483name = "block-buffer"
404version = "0.7.3"484version = "0.7.3"
405source = "registry+https://github.com/rust-lang/crates.io-index"485source = "registry+https://github.com/rust-lang/crates.io-index"
406checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"486checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
407dependencies = [487dependencies = [
408 "block-padding",488 "block-padding 0.1.5",
409 "byte-tools",489 "byte-tools",
410 "byteorder",490 "byteorder",
411 "generic-array 0.12.3",491 "generic-array 0.12.3",
417source = "registry+https://github.com/rust-lang/crates.io-index"497source = "registry+https://github.com/rust-lang/crates.io-index"
418checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"498checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
419dependencies = [499dependencies = [
420 "generic-array 0.14.3",500 "block-padding 0.2.1",
501 "generic-array 0.14.4",
421]502]
422503
423[[package]]504[[package]]
424name = "block-cipher"505name = "block-cipher"
425version = "0.7.1"506version = "0.8.0"
426source = "registry+https://github.com/rust-lang/crates.io-index"507source = "registry+https://github.com/rust-lang/crates.io-index"
427checksum = "fa136449e765dc7faa244561ccae839c394048667929af599b5d931ebe7b7f10"508checksum = "f337a3e6da609650eb74e02bc9fac7b735049f7623ab12f2e4c719316fcc7e80"
428dependencies = [509dependencies = [
429 "generic-array 0.14.3",510 "generic-array 0.14.4",
430]511]
431512
432[[package]]513[[package]]
439]520]
440521
441[[package]]522[[package]]
442name = "broadcaster"523name = "block-padding"
443version = "1.0.0"524version = "0.2.1"
444source = "registry+https://github.com/rust-lang/crates.io-index"525source = "registry+https://github.com/rust-lang/crates.io-index"
445checksum = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87"526checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
527
528[[package]]
529name = "blocking"
530version = "1.0.2"
531source = "registry+https://github.com/rust-lang/crates.io-index"
532checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9"
446dependencies = [533dependencies = [
447 "futures-channel",534 "async-channel",
448 "futures-core",535 "async-task",
449 "futures-sink",536 "atomic-waker",
450 "futures-util",537 "fastrand",
451 "parking_lot 0.10.2",538 "futures-lite",
452 "slab",539 "once_cell",
453]540]
454541
455[[package]]542[[package]]
456name = "bs58"543name = "bs58"
457version = "0.3.1"544version = "0.4.0"
458source = "registry+https://github.com/rust-lang/crates.io-index"545source = "registry+https://github.com/rust-lang/crates.io-index"
459checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb"546checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
460547
461[[package]]548[[package]]
462name = "bstr"549name = "bstr"
463version = "0.2.13"550version = "0.2.15"
464source = "registry+https://github.com/rust-lang/crates.io-index"551source = "registry+https://github.com/rust-lang/crates.io-index"
465checksum = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931"552checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d"
466dependencies = [553dependencies = [
467 "memchr",554 "memchr",
468]555]
469556
470[[package]]557[[package]]
471name = "bumpalo"558name = "bumpalo"
472version = "3.4.0"559version = "3.6.0"
473source = "registry+https://github.com/rust-lang/crates.io-index"560source = "registry+https://github.com/rust-lang/crates.io-index"
474checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"561checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9"
475562
476[[package]]563[[package]]
477name = "byte-slice-cast"564name = "byte-slice-cast"
487574
488[[package]]575[[package]]
489name = "byteorder"576name = "byteorder"
490version = "1.3.4"577version = "1.4.2"
491source = "registry+https://github.com/rust-lang/crates.io-index"578source = "registry+https://github.com/rust-lang/crates.io-index"
492checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"579checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b"
493580
494[[package]]581[[package]]
495name = "bytes"582name = "bytes"
509checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"596checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"
510597
511[[package]]598[[package]]
512name = "c_linked_list"599name = "bytes"
600version = "1.0.1"
601source = "registry+https://github.com/rust-lang/crates.io-index"
602checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
603
604[[package]]
605name = "cache-padded"
513version = "1.1.1"606version = "1.1.1"
514source = "registry+https://github.com/rust-lang/crates.io-index"607source = "registry+https://github.com/rust-lang/crates.io-index"
515checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b"608checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
516609
517[[package]]610[[package]]
518name = "cc"611name = "cc"
519version = "1.0.58"612version = "1.0.66"
520source = "registry+https://github.com/rust-lang/crates.io-index"613source = "registry+https://github.com/rust-lang/crates.io-index"
521checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518"614checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
522dependencies = [615dependencies = [
523 "jobserver",616 "jobserver",
524]617]
539checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"632checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
540633
541[[package]]634[[package]]
635name = "cfg-if"
636version = "1.0.0"
637source = "registry+https://github.com/rust-lang/crates.io-index"
638checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
639
640[[package]]
542name = "chacha20"641name = "chacha20"
543version = "0.4.3"642version = "0.5.0"
544source = "registry+https://github.com/rust-lang/crates.io-index"643source = "registry+https://github.com/rust-lang/crates.io-index"
545checksum = "086c0f07ac275808b7bf9a39f2fd013aae1498be83632814c8c4e0bd53f2dc58"644checksum = "244fbce0d47e97e8ef2f63b81d5e05882cb518c68531eb33194990d7b7e85845"
546dependencies = [645dependencies = [
547 "stream-cipher",646 "stream-cipher",
548 "zeroize",647 "zeroize",
549]648]
550649
551[[package]]650[[package]]
552name = "chacha20poly1305"651name = "chacha20poly1305"
553version = "0.5.1"652version = "0.6.0"
554source = "registry+https://github.com/rust-lang/crates.io-index"653source = "registry+https://github.com/rust-lang/crates.io-index"
555checksum = "18b0c90556d8e3fec7cf18d84a2f53d27b21288f2fe481b830fadcf809e48205"654checksum = "9bf18d374d66df0c05cdddd528a7db98f78c28e2519b120855c4f84c5027b1f5"
556dependencies = [655dependencies = [
557 "aead",656 "aead",
558 "chacha20",657 "chacha20",
563662
564[[package]]663[[package]]
565name = "chrono"664name = "chrono"
566version = "0.4.13"665version = "0.4.19"
567source = "registry+https://github.com/rust-lang/crates.io-index"666source = "registry+https://github.com/rust-lang/crates.io-index"
568checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6"667checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
569dependencies = [668dependencies = [
669 "libc",
570 "num-integer",670 "num-integer",
571 "num-traits 0.2.12",671 "num-traits",
572 "time",672 "time",
673 "winapi 0.3.9",
573]674]
574675
575[[package]]676[[package]]
677name = "cipher"
678version = "0.2.5"
679source = "registry+https://github.com/rust-lang/crates.io-index"
680checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801"
681dependencies = [
682 "generic-array 0.14.4",
683]
684
685[[package]]
576name = "clang-sys"686name = "clang-sys"
577version = "0.29.3"687version = "0.29.3"
578source = "registry+https://github.com/rust-lang/crates.io-index"688source = "registry+https://github.com/rust-lang/crates.io-index"
585695
586[[package]]696[[package]]
587name = "clap"697name = "clap"
588version = "2.33.1"698version = "2.33.3"
589source = "registry+https://github.com/rust-lang/crates.io-index"699source = "registry+https://github.com/rust-lang/crates.io-index"
590checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"700checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
591dependencies = [701dependencies = [
592 "ansi_term 0.11.0",702 "ansi_term 0.11.0",
593 "atty",703 "atty",
599]709]
600710
601[[package]]711[[package]]
602name = "clear_on_drop"
603version = "0.2.4"
604source = "registry+https://github.com/rust-lang/crates.io-index"
605checksum = "c9cc5db465b294c3fa986d5bbb0f3017cd850bff6dd6c52f9ccff8b4d21b7b08"
606dependencies = [
607 "cc",
608]
609
610[[package]]
611name = "cloudabi"712name = "cloudabi"
612version = "0.0.3"713version = "0.0.3"
613source = "registry+https://github.com/rust-lang/crates.io-index"714source = "registry+https://github.com/rust-lang/crates.io-index"
617]718]
618719
619[[package]]720[[package]]
620name = "const-random"721name = "concurrent-queue"
621version = "0.1.8"722version = "1.2.2"
622source = "registry+https://github.com/rust-lang/crates.io-index"723source = "registry+https://github.com/rust-lang/crates.io-index"
623checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a"724checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3"
624dependencies = [725dependencies = [
625 "const-random-macro",726 "cache-padded",
626 "proc-macro-hack",
627]727]
628728
629[[package]]729[[package]]
630name = "const-random-macro"730name = "const_fn"
631version = "0.1.8"731version = "0.4.5"
632source = "registry+https://github.com/rust-lang/crates.io-index"732source = "registry+https://github.com/rust-lang/crates.io-index"
633checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a"733checksum = "28b9d6de7f49e22cf97ad17fc4036ece69300032f45f78f30b4a4482cdc3f4a6"
634dependencies = [
635 "getrandom",
636 "proc-macro-hack",
637]
638734
639[[package]]735[[package]]
640name = "constant_time_eq"736name = "constant_time_eq"
665checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"761checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"
666762
667[[package]]763[[package]]
764name = "cpuid-bool"
765version = "0.2.0"
766source = "registry+https://github.com/rust-lang/crates.io-index"
767checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
768
769[[package]]
770name = "cranelift-bforest"
771version = "0.66.0"
772source = "registry+https://github.com/rust-lang/crates.io-index"
773checksum = "8dcc286b052ee24a1e5a222e7c1125e6010ad35b0f248709b9b3737a8fedcfdf"
774dependencies = [
775 "cranelift-entity",
776]
777
778[[package]]
779name = "cranelift-codegen"
780version = "0.66.0"
781source = "registry+https://github.com/rust-lang/crates.io-index"
782checksum = "9d9badfe36176cb653506091693bc2bb1970c9bddfcd6ec7fac404f7eaec6f38"
783dependencies = [
784 "byteorder",
785 "cranelift-bforest",
786 "cranelift-codegen-meta",
787 "cranelift-codegen-shared",
788 "cranelift-entity",
789 "gimli 0.21.0",
790 "log",
791 "regalloc",
792 "serde",
793 "smallvec 1.6.1",
794 "target-lexicon",
795 "thiserror",
796]
797
798[[package]]
799name = "cranelift-codegen-meta"
800version = "0.66.0"
801source = "registry+https://github.com/rust-lang/crates.io-index"
802checksum = "3c3f460031861e4f4ad510be62b2ae50bba6cc886b598a36f9c0a970feab9598"
803dependencies = [
804 "cranelift-codegen-shared",
805 "cranelift-entity",
806]
807
808[[package]]
809name = "cranelift-codegen-shared"
810version = "0.66.0"
811source = "registry+https://github.com/rust-lang/crates.io-index"
812checksum = "76ad12409e922e7697cd0bdc7dc26992f64a77c31880dfe5e3c7722f4710206d"
813
814[[package]]
815name = "cranelift-entity"
816version = "0.66.0"
817source = "registry+https://github.com/rust-lang/crates.io-index"
818checksum = "d97cdc58972ea065d107872cfb9079f4c92ade78a8af85aaff519a65b5d13f71"
819dependencies = [
820 "serde",
821]
822
823[[package]]
824name = "cranelift-frontend"
825version = "0.66.0"
826source = "registry+https://github.com/rust-lang/crates.io-index"
827checksum = "2ef419efb4f94ecc02e5d9fbcc910d2bb7f0040e2de570e63a454f883bc891d6"
828dependencies = [
829 "cranelift-codegen",
830 "log",
831 "smallvec 1.6.1",
832 "target-lexicon",
833]
834
835[[package]]
836name = "cranelift-native"
837version = "0.66.0"
838source = "registry+https://github.com/rust-lang/crates.io-index"
839checksum = "6e69d44d59826eef6794066ac2c0f4ad3975f02d97030c60dbc04e3886adf36e"
840dependencies = [
841 "cranelift-codegen",
842 "raw-cpuid",
843 "target-lexicon",
844]
845
846[[package]]
847name = "cranelift-wasm"
848version = "0.66.0"
849source = "registry+https://github.com/rust-lang/crates.io-index"
850checksum = "979df666b1304624abe99738e9e0e7c7479ee5523ba4b8b237df9ff49996acbb"
851dependencies = [
852 "cranelift-codegen",
853 "cranelift-entity",
854 "cranelift-frontend",
855 "log",
856 "serde",
857 "thiserror",
858 "wasmparser 0.59.0",
859]
860
861[[package]]
668name = "crc32fast"862name = "crc32fast"
669version = "1.2.0"863version = "1.2.1"
670source = "registry+https://github.com/rust-lang/crates.io-index"864source = "registry+https://github.com/rust-lang/crates.io-index"
671checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"865checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
672dependencies = [866dependencies = [
673 "cfg-if",867 "cfg-if 1.0.0",
674]868]
675869
676[[package]]870[[package]]
677name = "crossbeam-channel"871name = "crossbeam-channel"
678version = "0.4.2"872version = "0.5.0"
679source = "registry+https://github.com/rust-lang/crates.io-index"873source = "registry+https://github.com/rust-lang/crates.io-index"
680checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061"874checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775"
681dependencies = [875dependencies = [
682 "crossbeam-utils",876 "cfg-if 1.0.0",
683 "maybe-uninit",877 "crossbeam-utils 0.8.1",
684]878]
685879
686[[package]]880[[package]]
689source = "registry+https://github.com/rust-lang/crates.io-index"883source = "registry+https://github.com/rust-lang/crates.io-index"
690checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"884checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
691dependencies = [885dependencies = [
692 "crossbeam-epoch",886 "crossbeam-epoch 0.8.2",
693 "crossbeam-utils",887 "crossbeam-utils 0.7.2",
694 "maybe-uninit",888 "maybe-uninit",
695]889]
696890
697[[package]]891[[package]]
892name = "crossbeam-deque"
893version = "0.8.0"
894source = "registry+https://github.com/rust-lang/crates.io-index"
895checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
896dependencies = [
897 "cfg-if 1.0.0",
898 "crossbeam-epoch 0.9.1",
899 "crossbeam-utils 0.8.1",
900]
901
902[[package]]
698name = "crossbeam-epoch"903name = "crossbeam-epoch"
699version = "0.8.2"904version = "0.8.2"
700source = "registry+https://github.com/rust-lang/crates.io-index"905source = "registry+https://github.com/rust-lang/crates.io-index"
701checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"906checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
702dependencies = [907dependencies = [
703 "autocfg 1.0.0",908 "autocfg",
704 "cfg-if",909 "cfg-if 0.1.10",
705 "crossbeam-utils",910 "crossbeam-utils 0.7.2",
706 "lazy_static",911 "lazy_static",
707 "maybe-uninit",912 "maybe-uninit",
708 "memoffset",913 "memoffset 0.5.6",
709 "scopeguard",914 "scopeguard",
710]915]
711916
712[[package]]917[[package]]
918name = "crossbeam-epoch"
919version = "0.9.1"
920source = "registry+https://github.com/rust-lang/crates.io-index"
921checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d"
922dependencies = [
923 "cfg-if 1.0.0",
924 "const_fn",
925 "crossbeam-utils 0.8.1",
926 "lazy_static",
927 "memoffset 0.6.1",
928 "scopeguard",
929]
930
931[[package]]
713name = "crossbeam-queue"932name = "crossbeam-queue"
714version = "0.2.3"933version = "0.2.3"
715source = "registry+https://github.com/rust-lang/crates.io-index"934source = "registry+https://github.com/rust-lang/crates.io-index"
716checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"935checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"
717dependencies = [936dependencies = [
718 "cfg-if",937 "cfg-if 0.1.10",
719 "crossbeam-utils",938 "crossbeam-utils 0.7.2",
720 "maybe-uninit",939 "maybe-uninit",
721]940]
722941
726source = "registry+https://github.com/rust-lang/crates.io-index"945source = "registry+https://github.com/rust-lang/crates.io-index"
727checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"946checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
728dependencies = [947dependencies = [
729 "autocfg 1.0.0",948 "autocfg",
730 "cfg-if",949 "cfg-if 0.1.10",
731 "lazy_static",950 "lazy_static",
732]951]
733952
734[[package]]953[[package]]
954name = "crossbeam-utils"
955version = "0.8.1"
956source = "registry+https://github.com/rust-lang/crates.io-index"
957checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d"
958dependencies = [
959 "autocfg",
960 "cfg-if 1.0.0",
961 "lazy_static",
962]
963
964[[package]]
735name = "crunchy"965name = "crunchy"
736version = "0.2.2"966version = "0.2.2"
737source = "registry+https://github.com/rust-lang/crates.io-index"967source = "registry+https://github.com/rust-lang/crates.io-index"
753source = "registry+https://github.com/rust-lang/crates.io-index"983source = "registry+https://github.com/rust-lang/crates.io-index"
754checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"984checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
755dependencies = [985dependencies = [
756 "generic-array 0.14.3",986 "generic-array 0.14.4",
757 "subtle 2.2.3",987 "subtle 2.4.0",
758]988]
759989
760[[package]]990[[package]]
761name = "ct-logs"991name = "ct-logs"
762version = "0.6.0"992version = "0.7.0"
763source = "registry+https://github.com/rust-lang/crates.io-index"993source = "registry+https://github.com/rust-lang/crates.io-index"
764checksum = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113"994checksum = "8c8e13110a84b6315df212c045be706af261fd364791cad863285439ebba672e"
765dependencies = [995dependencies = [
766 "sct",996 "sct",
767]997]
768998
769[[package]]999[[package]]
1000name = "ctor"
1001version = "0.1.19"
1002source = "registry+https://github.com/rust-lang/crates.io-index"
1003checksum = "e8f45d9ad417bcef4817d614a501ab55cdd96a6fdb24f49aab89a54acfd66b19"
1004dependencies = [
1005 "quote",
1006 "syn",
1007]
1008
1009[[package]]
1010name = "cuckoofilter"
1011version = "0.5.0"
1012source = "registry+https://github.com/rust-lang/crates.io-index"
1013checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18"
1014dependencies = [
1015 "byteorder",
1016 "fnv",
1017 "rand 0.7.3",
1018]
1019
1020[[package]]
770name = "curve25519-dalek"1021name = "curve25519-dalek"
771version = "2.1.0"1022version = "2.1.2"
772source = "registry+https://github.com/rust-lang/crates.io-index"1023source = "registry+https://github.com/rust-lang/crates.io-index"
773checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5"1024checksum = "434e1720189a637d44fe464f4df1e6eb900b4835255b14354497c78af37d9bb8"
774dependencies = [1025dependencies = [
775 "byteorder",1026 "byteorder",
776 "digest 0.8.1",1027 "digest 0.8.1",
777 "rand_core 0.5.1",1028 "rand_core 0.5.1",
778 "subtle 2.2.3",1029 "subtle 2.4.0",
779 "zeroize",1030 "zeroize",
780]1031]
7811032
782[[package]]1033[[package]]
1034name = "curve25519-dalek"
1035version = "3.0.2"
1036source = "registry+https://github.com/rust-lang/crates.io-index"
1037checksum = "f627126b946c25a4638eec0ea634fc52506dea98db118aae985118ce7c3d723f"
1038dependencies = [
1039 "byteorder",
1040 "digest 0.9.0",
1041 "rand_core 0.5.1",
1042 "subtle 2.4.0",
1043 "zeroize",
1044]
1045
1046[[package]]
783name = "data-encoding"1047name = "data-encoding"
784version = "2.2.1"1048version = "2.3.2"
785source = "registry+https://github.com/rust-lang/crates.io-index"1049source = "registry+https://github.com/rust-lang/crates.io-index"
786checksum = "72aa14c04dfae8dd7d8a2b1cb7ca2152618cd01336dbfe704b8dcbf8d41dbd69"1050checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57"
7871051
788[[package]]1052[[package]]
789name = "derive_more"1053name = "derive_more"
790version = "0.99.9"1054version = "0.99.11"
791source = "registry+https://github.com/rust-lang/crates.io-index"1055source = "registry+https://github.com/rust-lang/crates.io-index"
792checksum = "298998b1cf6b5b2c8a7b023dfd45821825ce3ba8a8af55c921a0e734e4653f76"1056checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c"
793dependencies = [1057dependencies = [
794 "proc-macro2",1058 "proc-macro2",
795 "quote 1.0.7",1059 "quote",
796 "syn 1.0.34",1060 "syn",
797]1061]
7981062
799[[package]]1063[[package]]
811source = "registry+https://github.com/rust-lang/crates.io-index"1075source = "registry+https://github.com/rust-lang/crates.io-index"
812checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"1076checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
813dependencies = [1077dependencies = [
814 "generic-array 0.14.3",1078 "generic-array 0.14.4",
815]1079]
8161080
817[[package]]1081[[package]]
820source = "registry+https://github.com/rust-lang/crates.io-index"1084source = "registry+https://github.com/rust-lang/crates.io-index"
821checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c"1085checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c"
822dependencies = [1086dependencies = [
823 "cfg-if",1087 "cfg-if 0.1.10",
824 "dirs-sys",1088 "dirs-sys",
825]1089]
8261090
827[[package]]1091[[package]]
1092name = "directories"
1093version = "3.0.1"
1094source = "registry+https://github.com/rust-lang/crates.io-index"
1095checksum = "f8fed639d60b58d0f53498ab13d26f621fd77569cc6edb031f4cc36a2ad9da0f"
1096dependencies = [
1097 "dirs-sys",
1098]
1099
1100[[package]]
828name = "dirs-sys"1101name = "dirs-sys"
829version = "0.3.5"1102version = "0.3.5"
830source = "registry+https://github.com/rust-lang/crates.io-index"1103source = "registry+https://github.com/rust-lang/crates.io-index"
842checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea"1115checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea"
843dependencies = [1116dependencies = [
844 "byteorder",1117 "byteorder",
845 "quick-error",1118 "quick-error 1.2.3",
846]1119]
8471120
848[[package]]1121[[package]]
849name = "doc-comment"1122name = "dyn-clonable"
850version = "0.3.3"1123version = "0.9.0"
851source = "registry+https://github.com/rust-lang/crates.io-index"1124source = "registry+https://github.com/rust-lang/crates.io-index"
852checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"1125checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4"
1126dependencies = [
1127 "dyn-clonable-impl",
1128 "dyn-clone",
1129]
8531130
854[[package]]1131[[package]]
1132name = "dyn-clonable-impl"
1133version = "0.9.0"
1134source = "registry+https://github.com/rust-lang/crates.io-index"
1135checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5"
1136dependencies = [
1137 "proc-macro2",
1138 "quote",
1139 "syn",
1140]
1141
1142[[package]]
1143name = "dyn-clone"
1144version = "1.0.4"
1145source = "registry+https://github.com/rust-lang/crates.io-index"
1146checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf"
1147
1148[[package]]
1149name = "ed25519"
1150version = "1.0.3"
1151source = "registry+https://github.com/rust-lang/crates.io-index"
1152checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef"
1153dependencies = [
1154 "signature",
1155]
1156
1157[[package]]
855name = "ed25519-dalek"1158name = "ed25519-dalek"
856version = "1.0.0-pre.3"1159version = "1.0.1"
857source = "registry+https://github.com/rust-lang/crates.io-index"1160source = "registry+https://github.com/rust-lang/crates.io-index"
858checksum = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2"1161checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
859dependencies = [1162dependencies = [
860 "clear_on_drop",1163 "curve25519-dalek 3.0.2",
861 "curve25519-dalek",1164 "ed25519",
862 "rand 0.7.3",1165 "rand 0.7.3",
863 "sha2 0.8.2",1166 "serde",
1167 "sha2 0.9.3",
1168 "zeroize",
864]1169]
8651170
866[[package]]1171[[package]]
867name = "either"1172name = "either"
868version = "1.5.3"1173version = "1.6.1"
869source = "registry+https://github.com/rust-lang/crates.io-index"1174source = "registry+https://github.com/rust-lang/crates.io-index"
870checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"1175checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
8711176
872[[package]]1177[[package]]
873name = "enum-primitive-derive"1178name = "enumflags2"
874version = "0.1.2"1179version = "0.6.4"
875source = "registry+https://github.com/rust-lang/crates.io-index"1180source = "registry+https://github.com/rust-lang/crates.io-index"
876checksum = "e2b90e520ec62c1864c8c78d637acbfe8baf5f63240f2fb8165b8325c07812dd"1181checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0"
877dependencies = [1182dependencies = [
878 "num-traits 0.1.43",1183 "enumflags2_derive",
879 "quote 0.3.15",
880 "syn 0.11.11",
881]1184]
8821185
883[[package]]1186[[package]]
1187name = "enumflags2_derive"
1188version = "0.6.4"
1189source = "registry+https://github.com/rust-lang/crates.io-index"
1190checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce"
1191dependencies = [
1192 "proc-macro2",
1193 "quote",
1194 "syn",
1195]
1196
1197[[package]]
884name = "env_logger"1198name = "env_logger"
885version = "0.7.1"1199version = "0.7.1"
886source = "registry+https://github.com/rust-lang/crates.io-index"1200source = "registry+https://github.com/rust-lang/crates.io-index"
8951209
896[[package]]1210[[package]]
897name = "environmental"1211name = "environmental"
898version = "1.1.1"1212version = "1.1.2"
899source = "registry+https://github.com/rust-lang/crates.io-index"1213source = "registry+https://github.com/rust-lang/crates.io-index"
900checksum = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4"1214checksum = "6576a1755ddffd988788025e75bce9e74b018f7cc226198fe931d077911c6d7e"
9011215
902[[package]]1216[[package]]
903name = "erased-serde"1217name = "erased-serde"
904version = "0.3.12"1218version = "0.3.13"
905source = "registry+https://github.com/rust-lang/crates.io-index"1219source = "registry+https://github.com/rust-lang/crates.io-index"
906checksum = "6ca8b296792113e1500fd935ae487be6e00ce318952a6880555554824d6ebf38"1220checksum = "0465971a8cc1fa2455c8465aaa377131e1f1cf4983280f474a13e68793aa770c"
907dependencies = [1221dependencies = [
908 "serde",1222 "serde",
909]1223]
9101224
911[[package]]1225[[package]]
1226name = "errno"
1227version = "0.2.7"
1228source = "registry+https://github.com/rust-lang/crates.io-index"
1229checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe"
1230dependencies = [
1231 "errno-dragonfly",
1232 "libc",
1233 "winapi 0.3.9",
1234]
1235
1236[[package]]
1237name = "errno-dragonfly"
1238version = "0.1.1"
1239source = "registry+https://github.com/rust-lang/crates.io-index"
1240checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067"
1241dependencies = [
1242 "gcc",
1243 "libc",
1244]
1245
1246[[package]]
1247name = "event-listener"
1248version = "2.5.1"
1249source = "registry+https://github.com/rust-lang/crates.io-index"
1250checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
1251
1252[[package]]
912name = "exit-future"1253name = "exit-future"
913version = "0.2.0"1254version = "0.2.0"
914source = "registry+https://github.com/rust-lang/crates.io-index"1255source = "registry+https://github.com/rust-lang/crates.io-index"
915checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"1256checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"
916dependencies = [1257dependencies = [
917 "futures 0.3.5",1258 "futures 0.3.12",
918]1259]
9191260
920[[package]]1261[[package]]
934checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"1275checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
935dependencies = [1276dependencies = [
936 "proc-macro2",1277 "proc-macro2",
937 "quote 1.0.7",1278 "quote",
938 "syn 1.0.34",1279 "syn",
939 "synstructure",1280 "synstructure",
940]1281]
9411282
946checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"1287checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
9471288
948[[package]]1289[[package]]
1290name = "fallible-iterator"
1291version = "0.2.0"
1292source = "registry+https://github.com/rust-lang/crates.io-index"
1293checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
1294
1295[[package]]
1296name = "fastrand"
1297version = "1.4.0"
1298source = "registry+https://github.com/rust-lang/crates.io-index"
1299checksum = "ca5faf057445ce5c9d4329e382b2ce7ca38550ef3b73a5348362d5f24e0c7fe3"
1300dependencies = [
1301 "instant",
1302]
1303
1304[[package]]
949name = "fdlimit"1305name = "fdlimit"
950version = "0.1.4"1306version = "0.2.1"
951source = "registry+https://github.com/rust-lang/crates.io-index"1307source = "registry+https://github.com/rust-lang/crates.io-index"
952checksum = "0da54a593b34c71b889ee45f5b5bb900c74148c5f7f8c6a9479ee7899f69603c"1308checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b"
953dependencies = [1309dependencies = [
954 "libc",1310 "libc",
955]1311]
9561312
957[[package]]1313[[package]]
1314name = "file-per-thread-logger"
1315version = "0.1.4"
1316source = "registry+https://github.com/rust-lang/crates.io-index"
1317checksum = "4fdbe0d94371f9ce939b555dd342d0686cc4c0cadbcd4b61d70af5ff97eb4126"
1318dependencies = [
1319 "env_logger",
1320 "log",
1321]
1322
1323[[package]]
958name = "finality-grandpa"1324name = "finality-grandpa"
959version = "0.12.3"1325version = "0.12.3"
960source = "registry+https://github.com/rust-lang/crates.io-index"1326source = "registry+https://github.com/rust-lang/crates.io-index"
961checksum = "8feb87a63249689640ac9c011742c33139204e3c134293d3054022276869133b"1327checksum = "8feb87a63249689640ac9c011742c33139204e3c134293d3054022276869133b"
962dependencies = [1328dependencies = [
963 "either",1329 "either",
964 "futures 0.3.5",1330 "futures 0.3.12",
965 "futures-timer 2.0.2",1331 "futures-timer 2.0.2",
966 "log",1332 "log",
967 "num-traits 0.2.12",1333 "num-traits",
968 "parity-scale-codec",1334 "parity-scale-codec",
969 "parking_lot 0.9.0",1335 "parking_lot 0.9.0",
970]1336]
9711337
972[[package]]1338[[package]]
973name = "fixed-hash"1339name = "fixed-hash"
974version = "0.6.1"1340version = "0.7.0"
975source = "registry+https://github.com/rust-lang/crates.io-index"1341source = "registry+https://github.com/rust-lang/crates.io-index"
976checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c"1342checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
977dependencies = [1343dependencies = [
978 "byteorder",1344 "byteorder",
979 "rand 0.7.3",1345 "rand 0.8.3",
980 "rustc-hex",1346 "rustc-hex",
981 "static_assertions",1347 "static_assertions",
982]1348]
9891355
990[[package]]1356[[package]]
991name = "flate2"1357name = "flate2"
992version = "1.0.16"1358version = "1.0.20"
993source = "registry+https://github.com/rust-lang/crates.io-index"1359source = "registry+https://github.com/rust-lang/crates.io-index"
994checksum = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e"1360checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0"
995dependencies = [1361dependencies = [
996 "cfg-if",1362 "cfg-if 1.0.0",
997 "crc32fast",1363 "crc32fast",
998 "libc",1364 "libc",
999 "libz-sys",1365 "libz-sys",
1000 "miniz_oxide",1366 "miniz_oxide",
1001]1367]
10021368
1003[[package]]1369[[package]]
1370name = "flexi_logger"
1371version = "0.15.12"
1372source = "registry+https://github.com/rust-lang/crates.io-index"
1373checksum = "aaab3caedb4149800f91e8e4899f29cd9ddf3b569b04c365ca9334f92f7542bf"
1374dependencies = [
1375 "atty",
1376 "chrono",
1377 "glob",
1378 "lazy_static",
1379 "log",
1380 "regex",
1381 "thiserror",
1382 "yansi",
1383]
1384
1385[[package]]
1004name = "fnv"1386name = "fnv"
1005version = "1.0.7"1387version = "1.0.7"
1006source = "registry+https://github.com/rust-lang/crates.io-index"1388source = "registry+https://github.com/rust-lang/crates.io-index"
1007checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"1389checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
10081390
1009[[package]]1391[[package]]
1010name = "fork-tree"1392name = "fork-tree"
1011version = "2.0.0-rc4"1393version = "2.0.1"
1012source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1394source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1013dependencies = [1395dependencies = [
1014 "parity-scale-codec",1396 "parity-scale-codec",
1015]1397]
10161398
1017[[package]]1399[[package]]
1400name = "form_urlencoded"
1401version = "1.0.0"
1402source = "registry+https://github.com/rust-lang/crates.io-index"
1403checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00"
1404dependencies = [
1405 "matches",
1406 "percent-encoding 2.1.0",
1407]
1408
1409[[package]]
1018name = "frame-benchmarking"1410name = "frame-benchmarking"
1019version = "2.0.0-rc4"1411version = "2.0.1"
1020source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1412source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1021dependencies = [1413dependencies = [
1022 "frame-support",1414 "frame-support",
1023 "frame-system",1415 "frame-system",
1029 "sp-runtime",1421 "sp-runtime",
1030 "sp-runtime-interface",1422 "sp-runtime-interface",
1031 "sp-std",1423 "sp-std",
1424 "sp-storage",
1032]1425]
10331426
1034[[package]]1427[[package]]
1428name = "frame-benchmarking-cli"
1429version = "2.0.1"
1430source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1431dependencies = [
1432 "Inflector",
1433 "chrono",
1434 "frame-benchmarking",
1435 "handlebars",
1436 "parity-scale-codec",
1437 "sc-cli",
1438 "sc-client-db",
1439 "sc-executor",
1440 "sc-service",
1441 "serde",
1442 "sp-core",
1443 "sp-externalities",
1444 "sp-keystore",
1445 "sp-runtime",
1446 "sp-state-machine",
1447 "structopt",
1448]
1449
1450[[package]]
1035name = "frame-executive"1451name = "frame-executive"
1036version = "2.0.0-rc4"1452version = "2.0.1"
1037source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1453source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1038dependencies = [1454dependencies = [
1039 "frame-support",1455 "frame-support",
1040 "frame-system",1456 "frame-system",
1041 "parity-scale-codec",1457 "parity-scale-codec",
1042 "serde",1458 "serde",
1459 "sp-core",
1043 "sp-io",1460 "sp-io",
1044 "sp-runtime",1461 "sp-runtime",
1045 "sp-std",1462 "sp-std",
10481465
1049[[package]]1466[[package]]
1050name = "frame-metadata"1467name = "frame-metadata"
1051version = "11.0.0-rc4"1468version = "12.0.1"
1052source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1469source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1053dependencies = [1470dependencies = [
1054 "parity-scale-codec",1471 "parity-scale-codec",
1055 "serde",1472 "serde",
10591476
1060[[package]]1477[[package]]
1061name = "frame-support"1478name = "frame-support"
1062version = "2.0.0-rc4"1479version = "2.0.1"
1063source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1480source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1064dependencies = [1481dependencies = [
1065 "bitmask",1482 "bitflags",
1066 "frame-metadata",1483 "frame-metadata",
1067 "frame-support-procedural",1484 "frame-support-procedural",
1068 "impl-trait-for-tuples",1485 "impl-trait-for-tuples 0.2.1",
1069 "log",1486 "log",
1070 "once_cell",1487 "once_cell",
1071 "parity-scale-codec",1488 "parity-scale-codec",
1072 "paste",1489 "paste",
1073 "serde",1490 "serde",
1074 "smallvec 1.4.1",1491 "smallvec 1.6.1",
1075 "sp-arithmetic",1492 "sp-arithmetic",
1076 "sp-core",1493 "sp-core",
1077 "sp-inherents",1494 "sp-inherents",
10841501
1085[[package]]1502[[package]]
1086name = "frame-support-procedural"1503name = "frame-support-procedural"
1087version = "2.0.0-rc4"1504version = "2.0.1"
1088source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1505source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1089dependencies = [1506dependencies = [
1507 "Inflector",
1090 "frame-support-procedural-tools",1508 "frame-support-procedural-tools",
1091 "proc-macro2",1509 "proc-macro2",
1092 "quote 1.0.7",1510 "quote",
1093 "syn 1.0.34",1511 "syn",
1094]1512]
10951513
1096[[package]]1514[[package]]
1097name = "frame-support-procedural-tools"1515name = "frame-support-procedural-tools"
1098version = "2.0.0-rc4"1516version = "2.0.1"
1099source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1517source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1100dependencies = [1518dependencies = [
1101 "frame-support-procedural-tools-derive",1519 "frame-support-procedural-tools-derive",
1102 "proc-macro-crate",1520 "proc-macro-crate",
1103 "proc-macro2",1521 "proc-macro2",
1104 "quote 1.0.7",1522 "quote",
1105 "syn 1.0.34",1523 "syn",
1106]1524]
11071525
1108[[package]]1526[[package]]
1109name = "frame-support-procedural-tools-derive"1527name = "frame-support-procedural-tools-derive"
1110version = "2.0.0-rc4"1528version = "2.0.1"
1111source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1529source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1112dependencies = [1530dependencies = [
1113 "proc-macro2",1531 "proc-macro2",
1114 "quote 1.0.7",1532 "quote",
1115 "syn 1.0.34",1533 "syn",
1116]1534]
11171535
1118[[package]]1536[[package]]
1119name = "frame-system"1537name = "frame-system"
1120version = "2.0.0-rc4"1538version = "2.0.1"
1121source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1539source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1122dependencies = [1540dependencies = [
1123 "frame-support",1541 "frame-support",
1124 "impl-trait-for-tuples",1542 "impl-trait-for-tuples 0.2.1",
1125 "parity-scale-codec",1543 "parity-scale-codec",
1126 "serde",1544 "serde",
1127 "sp-core",1545 "sp-core",
1132]1550]
11331551
1134[[package]]1552[[package]]
1553name = "frame-system-benchmarking"
1554version = "2.0.1"
1555source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1556dependencies = [
1557 "frame-benchmarking",
1558 "frame-support",
1559 "frame-system",
1560 "parity-scale-codec",
1561 "sp-core",
1562 "sp-runtime",
1563 "sp-std",
1564]
1565
1566[[package]]
1567name = "frame-system-rpc-runtime-api"
1568version = "2.0.1"
1569source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
1570dependencies = [
1571 "parity-scale-codec",
1572 "sp-api",
1573]
1574
1575[[package]]
1135name = "fs-swap"1576name = "fs-swap"
1136version = "0.2.4"1577version = "0.2.5"
1137source = "registry+https://github.com/rust-lang/crates.io-index"1578source = "registry+https://github.com/rust-lang/crates.io-index"
1138checksum = "921d332c89b3b61a826de38c61ee5b6e02c56806cade1b0e5d81bd71f57a71bb"1579checksum = "5839fda247e24ca4919c87c71dd5ca658f1f39e4f06829f80e3f15c3bafcfc2c"
1139dependencies = [1580dependencies = [
1140 "lazy_static",1581 "lazy_static",
1141 "libc",1582 "libc",
11671608
1168[[package]]1609[[package]]
1169name = "futures"1610name = "futures"
1170version = "0.1.29"1611version = "0.1.30"
1171source = "registry+https://github.com/rust-lang/crates.io-index"1612source = "registry+https://github.com/rust-lang/crates.io-index"
1172checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef"1613checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed"
11731614
1174[[package]]1615[[package]]
1175name = "futures"1616name = "futures"
1176version = "0.3.5"1617version = "0.3.12"
1177source = "registry+https://github.com/rust-lang/crates.io-index"1618source = "registry+https://github.com/rust-lang/crates.io-index"
1178checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613"1619checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150"
1179dependencies = [1620dependencies = [
1180 "futures-channel",1621 "futures-channel",
1181 "futures-core",1622 "futures-core",
11881629
1189[[package]]1630[[package]]
1190name = "futures-channel"1631name = "futures-channel"
1191version = "0.3.5"1632version = "0.3.12"
1192source = "registry+https://github.com/rust-lang/crates.io-index"1633source = "registry+https://github.com/rust-lang/crates.io-index"
1193checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5"1634checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846"
1194dependencies = [1635dependencies = [
1195 "futures-core",1636 "futures-core",
1196 "futures-sink",1637 "futures-sink",
1197]1638]
11981639
1199[[package]]1640[[package]]
1200name = "futures-channel-preview"
1201version = "0.3.0-alpha.19"
1202source = "registry+https://github.com/rust-lang/crates.io-index"
1203checksum = "d5e5f4df964fa9c1c2f8bddeb5c3611631cacd93baf810fc8bb2fb4b495c263a"
1204dependencies = [
1205 "futures-core-preview",
1206]
1207
1208[[package]]
1209name = "futures-core"1641name = "futures-core"
1210version = "0.3.5"1642version = "0.3.12"
1211source = "registry+https://github.com/rust-lang/crates.io-index"1643source = "registry+https://github.com/rust-lang/crates.io-index"
1212checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399"1644checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65"
12131645
1214[[package]]1646[[package]]
1215name = "futures-core-preview"
1216version = "0.3.0-alpha.19"
1217source = "registry+https://github.com/rust-lang/crates.io-index"
1218checksum = "b35b6263fb1ef523c3056565fa67b1d16f0a8604ff12b11b08c25f28a734c60a"
1219
1220[[package]]
1221name = "futures-cpupool"1647name = "futures-cpupool"
1222version = "0.1.8"1648version = "0.1.8"
1223source = "registry+https://github.com/rust-lang/crates.io-index"1649source = "registry+https://github.com/rust-lang/crates.io-index"
1224checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"1650checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
1225dependencies = [1651dependencies = [
1226 "futures 0.1.29",1652 "futures 0.1.30",
1227 "num_cpus",1653 "num_cpus",
1228]1654]
12291655
1233source = "registry+https://github.com/rust-lang/crates.io-index"1659source = "registry+https://github.com/rust-lang/crates.io-index"
1234checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9"1660checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9"
1235dependencies = [1661dependencies = [
1236 "futures 0.1.29",1662 "futures 0.1.30",
1237 "futures 0.3.5",1663 "futures 0.3.12",
1238 "lazy_static",1664 "lazy_static",
1239 "log",1665 "log",
1240 "parking_lot 0.9.0",1666 "parking_lot 0.9.0",
1241 "pin-project",1667 "pin-project 0.4.27",
1242 "serde",1668 "serde",
1243 "serde_json",1669 "serde_json",
1244]1670]
12451671
1246[[package]]1672[[package]]
1247name = "futures-executor"1673name = "futures-executor"
1248version = "0.3.5"1674version = "0.3.12"
1249source = "registry+https://github.com/rust-lang/crates.io-index"1675source = "registry+https://github.com/rust-lang/crates.io-index"
1250checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314"1676checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9"
1251dependencies = [1677dependencies = [
1252 "futures-core",1678 "futures-core",
1253 "futures-task",1679 "futures-task",
12571683
1258[[package]]1684[[package]]
1259name = "futures-io"1685name = "futures-io"
1260version = "0.3.5"1686version = "0.3.12"
1261source = "registry+https://github.com/rust-lang/crates.io-index"1687source = "registry+https://github.com/rust-lang/crates.io-index"
1262checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789"1688checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500"
12631689
1264[[package]]1690[[package]]
1691name = "futures-lite"
1692version = "1.11.3"
1693source = "registry+https://github.com/rust-lang/crates.io-index"
1694checksum = "b4481d0cd0de1d204a4fa55e7d45f07b1d958abcb06714b3446438e2eff695fb"
1695dependencies = [
1696 "fastrand",
1697 "futures-core",
1698 "futures-io",
1699 "memchr",
1700 "parking",
1701 "pin-project-lite 0.2.4",
1702 "waker-fn",
1703]
1704
1705[[package]]
1265name = "futures-macro"1706name = "futures-macro"
1266version = "0.3.5"1707version = "0.3.12"
1267source = "registry+https://github.com/rust-lang/crates.io-index"1708source = "registry+https://github.com/rust-lang/crates.io-index"
1268checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39"1709checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd"
1269dependencies = [1710dependencies = [
1270 "proc-macro-hack",1711 "proc-macro-hack",
1271 "proc-macro2",1712 "proc-macro2",
1272 "quote 1.0.7",1713 "quote",
1273 "syn 1.0.34",1714 "syn",
1274]1715]
12751716
1276[[package]]1717[[package]]
1718name = "futures-rustls"
1719version = "0.21.1"
1720source = "registry+https://github.com/rust-lang/crates.io-index"
1721checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b"
1722dependencies = [
1723 "futures-io",
1724 "rustls 0.19.0",
1725 "webpki",
1726]
1727
1728[[package]]
1277name = "futures-sink"1729name = "futures-sink"
1278version = "0.3.5"1730version = "0.3.12"
1279source = "registry+https://github.com/rust-lang/crates.io-index"1731source = "registry+https://github.com/rust-lang/crates.io-index"
1280checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc"1732checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6"
12811733
1282[[package]]1734[[package]]
1283name = "futures-task"1735name = "futures-task"
1284version = "0.3.5"1736version = "0.3.12"
1285source = "registry+https://github.com/rust-lang/crates.io-index"1737source = "registry+https://github.com/rust-lang/crates.io-index"
1286checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626"1738checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86"
1287dependencies = [1739dependencies = [
1288 "once_cell",1740 "once_cell",
1289]1741]
13021754
1303[[package]]1755[[package]]
1304name = "futures-util"1756name = "futures-util"
1305version = "0.3.5"1757version = "0.3.12"
1306source = "registry+https://github.com/rust-lang/crates.io-index"1758source = "registry+https://github.com/rust-lang/crates.io-index"
1307checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6"1759checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b"
1308dependencies = [1760dependencies = [
1309 "futures 0.1.29",1761 "futures 0.1.30",
1310 "futures-channel",1762 "futures-channel",
1311 "futures-core",1763 "futures-core",
1312 "futures-io",1764 "futures-io",
1313 "futures-macro",1765 "futures-macro",
1314 "futures-sink",1766 "futures-sink",
1315 "futures-task",1767 "futures-task",
1316 "memchr",1768 "memchr",
1317 "pin-project",1769 "pin-project-lite 0.2.4",
1318 "pin-utils",1770 "pin-utils",
1319 "proc-macro-hack",1771 "proc-macro-hack",
1320 "proc-macro-nested",1772 "proc-macro-nested",
1321 "slab",1773 "slab",
1322]1774]
13231775
1324[[package]]1776[[package]]
1325name = "futures-util-preview"
1326version = "0.3.0-alpha.19"
1327source = "registry+https://github.com/rust-lang/crates.io-index"
1328checksum = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d"
1329dependencies = [
1330 "futures-channel-preview",
1331 "futures-core-preview",
1332 "pin-utils",
1333 "slab",
1334]
1335
1336[[package]]
1337name = "futures_codec"
1338version = "0.3.4"
1339source = "registry+https://github.com/rust-lang/crates.io-index"
1340checksum = "a0a73299e4718f5452e45980fc1d6957a070abe308d3700b63b8673f47e1c2b3"
1341dependencies = [
1342 "bytes 0.5.6",
1343 "futures 0.3.5",
1344 "memchr",
1345 "pin-project",
1346]
1347
1348[[package]]
1349name = "futures_codec"
1350version = "0.4.1"
1351source = "registry+https://github.com/rust-lang/crates.io-index"
1352checksum = "ce54d63f8b0c75023ed920d46fd71d0cbbb830b0ee012726b5b4f506fb6dea5b"
1353dependencies = [
1354 "bytes 0.5.6",
1355 "futures 0.3.5",
1356 "memchr",
1357 "pin-project",
1358]
1359
1360[[package]]
1361name = "gcc"1777name = "gcc"
1362version = "0.3.55"1778version = "0.3.55"
1363source = "registry+https://github.com/rust-lang/crates.io-index"1779source = "registry+https://github.com/rust-lang/crates.io-index"
13741790
1375[[package]]1791[[package]]
1376name = "generic-array"1792name = "generic-array"
1377version = "0.14.3"1793version = "0.13.2"
1378source = "registry+https://github.com/rust-lang/crates.io-index"1794source = "registry+https://github.com/rust-lang/crates.io-index"
1379checksum = "60fb4bb6bba52f78a471264d9a3b7d026cc0af47b22cd2cffbc0b787ca003e63"1795checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd"
1380dependencies = [1796dependencies = [
1381 "typenum",1797 "typenum",
1382 "version_check",
1383]1798]
13841799
1385[[package]]1800[[package]]
1386name = "get_if_addrs"1801name = "generic-array"
1387version = "0.5.3"1802version = "0.14.4"
1388source = "registry+https://github.com/rust-lang/crates.io-index"1803source = "registry+https://github.com/rust-lang/crates.io-index"
1389checksum = "abddb55a898d32925f3148bd281174a68eeb68bbfd9a5938a57b18f506ee4ef7"1804checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
1390dependencies = [1805dependencies = [
1391 "c_linked_list",1806 "typenum",
1392 "get_if_addrs-sys",1807 "version_check",
1393 "libc",
1394 "winapi 0.2.8",
1395]1808]
13961809
1397[[package]]1810[[package]]
1398name = "get_if_addrs-sys"1811name = "getrandom"
1399version = "0.1.1"1812version = "0.1.16"
1400source = "registry+https://github.com/rust-lang/crates.io-index"1813source = "registry+https://github.com/rust-lang/crates.io-index"
1401checksum = "0d04f9fb746cf36b191c00f3ede8bde9c8e64f9f4b05ae2694a9ccf5e3f5ab48"1814checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
1402dependencies = [1815dependencies = [
1403 "gcc",1816 "cfg-if 1.0.0",
1404 "libc",1817 "libc",
1818 "wasi 0.9.0+wasi-snapshot-preview1",
1405]1819]
14061820
1407[[package]]1821[[package]]
1408name = "getrandom"1822name = "getrandom"
1409version = "0.1.14"1823version = "0.2.2"
1410source = "registry+https://github.com/rust-lang/crates.io-index"1824source = "registry+https://github.com/rust-lang/crates.io-index"
1411checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"1825checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
1412dependencies = [1826dependencies = [
1413 "cfg-if",1827 "cfg-if 1.0.0",
1414 "libc",1828 "libc",
1415 "wasi",1829 "wasi 0.10.0+wasi-snapshot-preview1",
1416]1830]
14171831
1418[[package]]1832[[package]]
1419name = "ghash"1833name = "ghash"
1420version = "0.3.0"1834version = "0.3.1"
1421source = "registry+https://github.com/rust-lang/crates.io-index"1835source = "registry+https://github.com/rust-lang/crates.io-index"
1422checksum = "d6e27f0689a6e15944bdce7e45425efb87eaa8ab0c6e87f11d0987a9133e2531"1836checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375"
1423dependencies = [1837dependencies = [
1838 "opaque-debug 0.3.0",
1424 "polyval",1839 "polyval",
1425]1840]
14261841
1427[[package]]1842[[package]]
1428name = "gimli"1843name = "gimli"
1429version = "0.22.0"1844version = "0.21.0"
1430source = "registry+https://github.com/rust-lang/crates.io-index"1845source = "registry+https://github.com/rust-lang/crates.io-index"
1431checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724"1846checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c"
1847dependencies = [
1848 "fallible-iterator",
1849 "indexmap",
1850 "stable_deref_trait",
1851]
14321852
1433[[package]]1853[[package]]
1854name = "gimli"
1855version = "0.23.0"
1856source = "registry+https://github.com/rust-lang/crates.io-index"
1857checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
1858
1859[[package]]
1434name = "glob"1860name = "glob"
1435version = "0.3.0"1861version = "0.3.0"
1436source = "registry+https://github.com/rust-lang/crates.io-index"1862source = "registry+https://github.com/rust-lang/crates.io-index"
1437checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"1863checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
14381864
1439[[package]]1865[[package]]
1440name = "globset"1866name = "globset"
1441version = "0.4.5"1867version = "0.4.6"
1442source = "registry+https://github.com/rust-lang/crates.io-index"1868source = "registry+https://github.com/rust-lang/crates.io-index"
1443checksum = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120"1869checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a"
1444dependencies = [1870dependencies = [
1445 "aho-corasick",1871 "aho-corasick",
1446 "bstr",1872 "bstr",
1450]1876]
14511877
1452[[package]]1878[[package]]
1879name = "gloo-timers"
1880version = "0.2.1"
1881source = "registry+https://github.com/rust-lang/crates.io-index"
1882checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f"
1883dependencies = [
1884 "futures-channel",
1885 "futures-core",
1886 "js-sys",
1887 "wasm-bindgen",
1888 "web-sys",
1889]
1890
1891[[package]]
1453name = "h2"1892name = "h2"
1454version = "0.1.26"1893version = "0.1.26"
1455source = "registry+https://github.com/rust-lang/crates.io-index"1894source = "registry+https://github.com/rust-lang/crates.io-index"
1458 "byteorder",1897 "byteorder",
1459 "bytes 0.4.12",1898 "bytes 0.4.12",
1460 "fnv",1899 "fnv",
1461 "futures 0.1.29",1900 "futures 0.1.30",
1462 "http 0.1.21",1901 "http 0.1.21",
1463 "indexmap",1902 "indexmap",
1464 "log",1903 "log",
14691908
1470[[package]]1909[[package]]
1471name = "h2"1910name = "h2"
1472version = "0.2.6"1911version = "0.2.7"
1473source = "registry+https://github.com/rust-lang/crates.io-index"1912source = "registry+https://github.com/rust-lang/crates.io-index"
1474checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53"1913checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535"
1475dependencies = [1914dependencies = [
1476 "bytes 0.5.6",1915 "bytes 0.5.6",
1477 "fnv",1916 "fnv",
1478 "futures-core",1917 "futures-core",
1479 "futures-sink",1918 "futures-sink",
1480 "futures-util",1919 "futures-util",
1481 "http 0.2.1",1920 "http 0.2.3",
1482 "indexmap",1921 "indexmap",
1483 "slab",1922 "slab",
1484 "tokio 0.2.21",1923 "tokio 0.2.25",
1485 "tokio-util",1924 "tokio-util",
1486 "tracing",1925 "tracing",
1926 "tracing-futures",
1487]1927]
14881928
1489[[package]]1929[[package]]
1930name = "handlebars"
1931version = "3.5.2"
1932source = "registry+https://github.com/rust-lang/crates.io-index"
1933checksum = "964d0e99a61fe9b1b347389b77ebf8b7e1587b70293676aaca7d27e59b9073b2"
1934dependencies = [
1935 "log",
1936 "pest",
1937 "pest_derive",
1938 "quick-error 2.0.0",
1939 "serde",
1940 "serde_json",
1941]
1942
1943[[package]]
1490name = "hash-db"1944name = "hash-db"
1491version = "0.15.2"1945version = "0.15.2"
1492source = "registry+https://github.com/rust-lang/crates.io-index"1946source = "registry+https://github.com/rust-lang/crates.io-index"
15031957
1504[[package]]1958[[package]]
1505name = "hashbrown"1959name = "hashbrown"
1506version = "0.6.3"1960version = "0.9.1"
1507source = "registry+https://github.com/rust-lang/crates.io-index"1961source = "registry+https://github.com/rust-lang/crates.io-index"
1508checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead"1962checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
1509dependencies = [1963dependencies = [
1510 "ahash",1964 "ahash",
1511 "autocfg 0.1.7",
1512]1965]
15131966
1514[[package]]1967[[package]]
1515name = "hashbrown"
1516version = "0.8.1"
1517source = "registry+https://github.com/rust-lang/crates.io-index"
1518checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb"
1519dependencies = [
1520 "autocfg 1.0.0",
1521]
1522
1523[[package]]
1524name = "heck"1968name = "heck"
1525version = "0.3.1"1969version = "0.3.2"
1526source = "registry+https://github.com/rust-lang/crates.io-index"1970source = "registry+https://github.com/rust-lang/crates.io-index"
1527checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"1971checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac"
1528dependencies = [1972dependencies = [
1529 "unicode-segmentation",1973 "unicode-segmentation",
1530]1974]
15311975
1532[[package]]1976[[package]]
1533name = "hermit-abi"1977name = "hermit-abi"
1534version = "0.1.15"1978version = "0.1.18"
1535source = "registry+https://github.com/rust-lang/crates.io-index"1979source = "registry+https://github.com/rust-lang/crates.io-index"
1536checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9"1980checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
1537dependencies = [1981dependencies = [
1538 "libc",1982 "libc",
1539]1983]
15461990
1547[[package]]1991[[package]]
1548name = "hex-literal"1992name = "hex-literal"
1549version = "0.2.1"1993version = "0.3.1"
1550source = "registry+https://github.com/rust-lang/crates.io-index"1994source = "registry+https://github.com/rust-lang/crates.io-index"
1551checksum = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0"1995checksum = "5af1f635ef1bc545d78392b136bfe1c9809e029023c84a3638a864a10b8819c8"
1552dependencies = [
1553 "hex-literal-impl",
1554 "proc-macro-hack",
1555]
15561996
1557[[package]]1997[[package]]
1558name = "hex-literal-impl"1998name = "hex_fmt"
1559version = "0.2.2"1999version = "0.3.0"
1560source = "registry+https://github.com/rust-lang/crates.io-index"2000source = "registry+https://github.com/rust-lang/crates.io-index"
1561checksum = "853f769599eb31de176303197b7ba4973299c38c7a7604a6bc88c3eef05b9b46"2001checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f"
1562dependencies = [
1563 "proc-macro-hack",
1564]
15652002
1566[[package]]2003[[package]]
1567name = "hmac"2004name = "hmac"
1574]2011]
15752012
1576[[package]]2013[[package]]
2014name = "hmac"
2015version = "0.8.1"
2016source = "registry+https://github.com/rust-lang/crates.io-index"
2017checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
2018dependencies = [
2019 "crypto-mac 0.8.0",
2020 "digest 0.9.0",
2021]
2022
2023[[package]]
1577name = "hmac-drbg"2024name = "hmac-drbg"
1578version = "0.2.0"2025version = "0.2.0"
1579source = "registry+https://github.com/rust-lang/crates.io-index"2026source = "registry+https://github.com/rust-lang/crates.io-index"
1580checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b"2027checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b"
1581dependencies = [2028dependencies = [
1582 "digest 0.8.1",2029 "digest 0.8.1",
1583 "generic-array 0.12.3",2030 "generic-array 0.12.3",
1584 "hmac",2031 "hmac 0.7.1",
1585]2032]
15862033
1587[[package]]2034[[package]]
15972044
1598[[package]]2045[[package]]
1599name = "http"2046name = "http"
1600version = "0.2.1"2047version = "0.2.3"
1601source = "registry+https://github.com/rust-lang/crates.io-index"2048source = "registry+https://github.com/rust-lang/crates.io-index"
1602checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9"2049checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747"
1603dependencies = [2050dependencies = [
1604 "bytes 0.5.6",2051 "bytes 1.0.1",
1605 "fnv",2052 "fnv",
1606 "itoa",2053 "itoa",
1607]2054]
1613checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d"2060checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d"
1614dependencies = [2061dependencies = [
1615 "bytes 0.4.12",2062 "bytes 0.4.12",
1616 "futures 0.1.29",2063 "futures 0.1.30",
1617 "http 0.1.21",2064 "http 0.1.21",
1618 "tokio-buf",2065 "tokio-buf",
1619]2066]
1625checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"2072checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
1626dependencies = [2073dependencies = [
1627 "bytes 0.5.6",2074 "bytes 0.5.6",
1628 "http 0.2.1",2075 "http 0.2.3",
1629]2076]
16302077
1631[[package]]2078[[package]]
1632name = "httparse"2079name = "httparse"
1633version = "1.3.4"2080version = "1.3.5"
1634source = "registry+https://github.com/rust-lang/crates.io-index"2081source = "registry+https://github.com/rust-lang/crates.io-index"
1635checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"2082checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691"
16362083
1637[[package]]2084[[package]]
2085name = "httpdate"
2086version = "0.3.2"
2087source = "registry+https://github.com/rust-lang/crates.io-index"
2088checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
2089
2090[[package]]
1638name = "humantime"2091name = "humantime"
1639version = "1.3.0"2092version = "1.3.0"
1640source = "registry+https://github.com/rust-lang/crates.io-index"2093source = "registry+https://github.com/rust-lang/crates.io-index"
1641checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"2094checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
1642dependencies = [2095dependencies = [
1643 "quick-error",2096 "quick-error 1.2.3",
1644]2097]
16452098
1646[[package]]2099[[package]]
1650checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6"2103checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6"
1651dependencies = [2104dependencies = [
1652 "bytes 0.4.12",2105 "bytes 0.4.12",
1653 "futures 0.1.29",2106 "futures 0.1.30",
1654 "futures-cpupool",2107 "futures-cpupool",
1655 "h2 0.1.26",2108 "h2 0.1.26",
1656 "http 0.1.21",2109 "http 0.1.21",
1664 "time",2117 "time",
1665 "tokio 0.1.22",2118 "tokio 0.1.22",
1666 "tokio-buf",2119 "tokio-buf",
1667 "tokio-executor 0.1.10",2120 "tokio-executor",
1668 "tokio-io",2121 "tokio-io",
1669 "tokio-reactor",2122 "tokio-reactor",
1670 "tokio-tcp",2123 "tokio-tcp",
16752128
1676[[package]]2129[[package]]
1677name = "hyper"2130name = "hyper"
1678version = "0.13.7"2131version = "0.13.10"
1679source = "registry+https://github.com/rust-lang/crates.io-index"2132source = "registry+https://github.com/rust-lang/crates.io-index"
1680checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb"2133checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb"
1681dependencies = [2134dependencies = [
1682 "bytes 0.5.6",2135 "bytes 0.5.6",
1683 "futures-channel",2136 "futures-channel",
1684 "futures-core",2137 "futures-core",
1685 "futures-util",2138 "futures-util",
1686 "h2 0.2.6",2139 "h2 0.2.7",
1687 "http 0.2.1",2140 "http 0.2.3",
1688 "http-body 0.3.1",2141 "http-body 0.3.1",
1689 "httparse",2142 "httparse",
2143 "httpdate",
1690 "itoa",2144 "itoa",
1691 "pin-project",2145 "pin-project 1.0.5",
1692 "socket2",2146 "socket2",
1693 "time",2147 "tokio 0.2.25",
1694 "tokio 0.2.21",
1695 "tower-service",2148 "tower-service",
1696 "tracing",2149 "tracing",
1697 "want 0.3.0",2150 "want 0.3.0",
1698]2151]
16992152
1700[[package]]2153[[package]]
1701name = "hyper-rustls"2154name = "hyper-rustls"
1702version = "0.20.0"2155version = "0.21.0"
1703source = "registry+https://github.com/rust-lang/crates.io-index"2156source = "registry+https://github.com/rust-lang/crates.io-index"
1704checksum = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08"2157checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6"
1705dependencies = [2158dependencies = [
1706 "bytes 0.5.6",2159 "bytes 0.5.6",
1707 "ct-logs",2160 "ct-logs",
1708 "futures-util",2161 "futures-util",
1709 "hyper 0.13.7",2162 "hyper 0.13.10",
1710 "log",2163 "log",
1711 "rustls",2164 "rustls 0.18.1",
1712 "rustls-native-certs",2165 "rustls-native-certs",
1713 "tokio 0.2.21",2166 "tokio 0.2.25",
1714 "tokio-rustls",2167 "tokio-rustls",
1715 "webpki",2168 "webpki",
1716]2169]
17282181
1729[[package]]2182[[package]]
1730name = "idna"2183name = "idna"
1731version = "0.2.0"2184version = "0.2.1"
1732source = "registry+https://github.com/rust-lang/crates.io-index"2185source = "registry+https://github.com/rust-lang/crates.io-index"
1733checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"2186checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094"
1734dependencies = [2187dependencies = [
1735 "matches",2188 "matches",
1736 "unicode-bidi",2189 "unicode-bidi",
1737 "unicode-normalization",2190 "unicode-normalization",
1738]2191]
17392192
1740[[package]]2193[[package]]
1741name = "impl-codec"2194name = "if-addrs"
1742version = "0.4.2"2195version = "0.6.5"
1743source = "registry+https://github.com/rust-lang/crates.io-index"2196source = "registry+https://github.com/rust-lang/crates.io-index"
1744checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53"2197checksum = "28538916eb3f3976311f5dfbe67b5362d0add1293d0a9cad17debf86f8e3aa48"
1745dependencies = [2198dependencies = [
1746 "parity-scale-codec",2199 "if-addrs-sys",
2200 "libc",
2201 "winapi 0.3.9",
1747]2202]
17482203
1749[[package]]2204[[package]]
1750name = "impl-serde"2205name = "if-addrs-sys"
1751version = "0.2.3"2206version = "0.3.2"
1752source = "registry+https://github.com/rust-lang/crates.io-index"2207source = "registry+https://github.com/rust-lang/crates.io-index"
1753checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8"2208checksum = "de74b9dd780476e837e5eb5ab7c88b49ed304126e412030a0adba99c8efe79ea"
1754dependencies = [2209dependencies = [
1755 "serde",2210 "cc",
2211 "libc",
1756]2212]
17572213
1758[[package]]2214[[package]]
2215name = "if-watch"
2216version = "0.1.8"
2217source = "registry+https://github.com/rust-lang/crates.io-index"
2218checksum = "97b8538953a3f0d0d3868f0a706eb4273535e10d72acb5c82c1c23ae48835c85"
2219dependencies = [
2220 "async-io",
2221 "futures 0.3.12",
2222 "futures-lite",
2223 "if-addrs",
2224 "ipnet",
2225 "libc",
2226 "log",
2227 "winapi 0.3.9",
2228]
2229
2230[[package]]
2231name = "impl-codec"
2232version = "0.4.2"
2233source = "registry+https://github.com/rust-lang/crates.io-index"
2234checksum = "1be51a921b067b0eaca2fad532d9400041561aa922221cc65f95a85641c6bf53"
2235dependencies = [
2236 "parity-scale-codec",
2237]
2238
2239[[package]]
1759name = "impl-serde"2240name = "impl-serde"
1760version = "0.3.1"2241version = "0.3.1"
1761source = "registry+https://github.com/rust-lang/crates.io-index"2242source = "registry+https://github.com/rust-lang/crates.io-index"
1771checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d"2252checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d"
1772dependencies = [2253dependencies = [
1773 "proc-macro2",2254 "proc-macro2",
1774 "quote 1.0.7",2255 "quote",
1775 "syn 1.0.34",2256 "syn",
1776]2257]
17772258
1778[[package]]2259[[package]]
2260name = "impl-trait-for-tuples"
2261version = "0.2.1"
2262source = "registry+https://github.com/rust-lang/crates.io-index"
2263checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee"
2264dependencies = [
2265 "proc-macro2",
2266 "quote",
2267 "syn",
2268]
2269
2270[[package]]
1779name = "indexmap"2271name = "indexmap"
1780version = "1.5.0"2272version = "1.6.1"
1781source = "registry+https://github.com/rust-lang/crates.io-index"2273source = "registry+https://github.com/rust-lang/crates.io-index"
1782checksum = "5b88cd59ee5f71fea89a62248fc8f387d44400cefe05ef548466d61ced9029a7"2274checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b"
1783dependencies = [2275dependencies = [
1784 "autocfg 1.0.0",2276 "autocfg",
1785 "hashbrown 0.8.1",2277 "hashbrown",
2278 "serde",
1786]2279]
17872280
1788[[package]]2281[[package]]
2282name = "instant"
2283version = "0.1.9"
2284source = "registry+https://github.com/rust-lang/crates.io-index"
2285checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec"
2286dependencies = [
2287 "cfg-if 1.0.0",
2288]
2289
2290[[package]]
1789name = "integer-sqrt"2291name = "integer-sqrt"
1790version = "0.1.3"2292version = "0.1.5"
1791source = "registry+https://github.com/rust-lang/crates.io-index"2293source = "registry+https://github.com/rust-lang/crates.io-index"
1792checksum = "f65877bf7d44897a473350b1046277941cee20b263397e90869c50b6e766088b"2294checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770"
2295dependencies = [
2296 "num-traits",
2297]
17932298
1794[[package]]2299[[package]]
1795name = "intervalier"2300name = "intervalier"
1796version = "0.4.0"2301version = "0.4.0"
1797source = "registry+https://github.com/rust-lang/crates.io-index"2302source = "registry+https://github.com/rust-lang/crates.io-index"
1798checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"2303checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"
1799dependencies = [2304dependencies = [
1800 "futures 0.3.5",2305 "futures 0.3.12",
1801 "futures-timer 2.0.2",2306 "futures-timer 2.0.2",
1802]2307]
18032308
18242329
1825[[package]]2330[[package]]
1826name = "itertools"2331name = "itertools"
1827version = "0.8.2"
1828source = "registry+https://github.com/rust-lang/crates.io-index"
1829checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
1830dependencies = [
1831 "either",
1832]
1833
1834[[package]]
1835name = "itertools"
1836version = "0.9.0"2332version = "0.9.0"
1837source = "registry+https://github.com/rust-lang/crates.io-index"2333source = "registry+https://github.com/rust-lang/crates.io-index"
1838checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"2334checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
18422338
1843[[package]]2339[[package]]
1844name = "itoa"2340name = "itoa"
1845version = "0.4.6"2341version = "0.4.7"
1846source = "registry+https://github.com/rust-lang/crates.io-index"2342source = "registry+https://github.com/rust-lang/crates.io-index"
1847checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"2343checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
18482344
1849[[package]]2345[[package]]
1850name = "jobserver"2346name = "jobserver"
18572353
1858[[package]]2354[[package]]
1859name = "js-sys"2355name = "js-sys"
1860version = "0.3.42"2356version = "0.3.47"
1861source = "registry+https://github.com/rust-lang/crates.io-index"2357source = "registry+https://github.com/rust-lang/crates.io-index"
1862checksum = "52732a3d3ad72c58ad2dc70624f9c17b46ecd0943b9a4f1ee37c4c18c5d983e2"2358checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65"
1863dependencies = [2359dependencies = [
1864 "wasm-bindgen",2360 "wasm-bindgen",
1865]2361]
18662362
1867[[package]]2363[[package]]
1868name = "jsonrpc-client-transports"2364name = "jsonrpc-client-transports"
1869version = "14.2.0"2365version = "15.1.0"
1870source = "registry+https://github.com/rust-lang/crates.io-index"2366source = "registry+https://github.com/rust-lang/crates.io-index"
1871checksum = "ecbdaacc17243168d9d1fa6b2bd7556a27e1e60a621d8a2a6e590ae2b145d158"2367checksum = "489b9c612e60c766f751ab40fcb43cbb55a1e10bb44a9b4307ed510ca598cbd7"
1872dependencies = [2368dependencies = [
1873 "failure",2369 "failure",
1874 "futures 0.1.29",2370 "futures 0.1.30",
1875 "jsonrpc-core",2371 "jsonrpc-core",
1876 "jsonrpc-pubsub",2372 "jsonrpc-pubsub",
1877 "log",2373 "log",
18822378
1883[[package]]2379[[package]]
1884name = "jsonrpc-core"2380name = "jsonrpc-core"
1885version = "14.2.0"2381version = "15.1.0"
1886source = "registry+https://github.com/rust-lang/crates.io-index"2382source = "registry+https://github.com/rust-lang/crates.io-index"
1887checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62"2383checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa"
1888dependencies = [2384dependencies = [
1889 "futures 0.1.29",2385 "futures 0.1.30",
1890 "log",2386 "log",
1891 "serde",2387 "serde",
1892 "serde_derive",2388 "serde_derive",
18952391
1896[[package]]2392[[package]]
1897name = "jsonrpc-core-client"2393name = "jsonrpc-core-client"
1898version = "14.2.0"2394version = "15.1.0"
1899source = "registry+https://github.com/rust-lang/crates.io-index"2395source = "registry+https://github.com/rust-lang/crates.io-index"
1900checksum = "34221123bc79b66279a3fde2d3363553835b43092d629b34f2e760c44dc94713"2396checksum = "6f764902d7b891344a0acb65625f32f6f7c6db006952143bd650209fbe7d94db"
1901dependencies = [2397dependencies = [
1902 "jsonrpc-client-transports",2398 "jsonrpc-client-transports",
1903]2399]
19042400
1905[[package]]2401[[package]]
1906name = "jsonrpc-derive"2402name = "jsonrpc-derive"
1907version = "14.2.1"2403version = "15.1.0"
1908source = "registry+https://github.com/rust-lang/crates.io-index"2404source = "registry+https://github.com/rust-lang/crates.io-index"
1909checksum = "0fadf6945e227246825a583514534d864554e9f23d80b3c77d034b10983db5ef"2405checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3"
1910dependencies = [2406dependencies = [
1911 "proc-macro-crate",2407 "proc-macro-crate",
1912 "proc-macro2",2408 "proc-macro2",
1913 "quote 1.0.7",2409 "quote",
1914 "syn 1.0.34",2410 "syn",
1915]2411]
19162412
1917[[package]]2413[[package]]
1918name = "jsonrpc-http-server"2414name = "jsonrpc-http-server"
1919version = "14.2.0"2415version = "15.1.0"
1920source = "registry+https://github.com/rust-lang/crates.io-index"2416source = "registry+https://github.com/rust-lang/crates.io-index"
1921checksum = "0da906d682799df05754480dac1b9e70ec92e12c19ebafd2662a5ea1c9fd6522"2417checksum = "4fb5c4513b7b542f42da107942b7b759f27120b5cc894729f88254b28dff44b7"
1922dependencies = [2418dependencies = [
1923 "hyper 0.12.35",2419 "hyper 0.12.35",
1924 "jsonrpc-core",2420 "jsonrpc-core",
19312427
1932[[package]]2428[[package]]
1933name = "jsonrpc-ipc-server"2429name = "jsonrpc-ipc-server"
1934version = "14.2.0"2430version = "15.1.0"
1935source = "registry+https://github.com/rust-lang/crates.io-index"2431source = "registry+https://github.com/rust-lang/crates.io-index"
1936checksum = "dedccd693325d833963b549e959137f30a7a0ea650cde92feda81dc0c1393cb5"2432checksum = "cf50e53e4eea8f421a7316c5f63e395f7bc7c4e786a6dc54d76fab6ff7aa7ce7"
1937dependencies = [2433dependencies = [
1938 "jsonrpc-core",2434 "jsonrpc-core",
1939 "jsonrpc-server-utils",2435 "jsonrpc-server-utils",
19452441
1946[[package]]2442[[package]]
1947name = "jsonrpc-pubsub"2443name = "jsonrpc-pubsub"
1948version = "14.2.0"2444version = "15.1.0"
1949source = "registry+https://github.com/rust-lang/crates.io-index"2445source = "registry+https://github.com/rust-lang/crates.io-index"
1950checksum = "2d44f5602a11d657946aac09357956d2841299ed422035edf140c552cb057986"2446checksum = "639558e0604013be9787ae52f798506ae42bf4220fe587bdc5625871cc8b9c77"
1951dependencies = [2447dependencies = [
1952 "jsonrpc-core",2448 "jsonrpc-core",
1953 "log",2449 "log",
19582454
1959[[package]]2455[[package]]
1960name = "jsonrpc-server-utils"2456name = "jsonrpc-server-utils"
1961version = "14.2.0"2457version = "15.1.0"
1962source = "registry+https://github.com/rust-lang/crates.io-index"2458source = "registry+https://github.com/rust-lang/crates.io-index"
1963checksum = "56cbfb462e7f902e21121d9f0d1c2b77b2c5b642e1a4e8f4ebfa2e15b94402bb"2459checksum = "72f1f3990650c033bd8f6bd46deac76d990f9bbfb5f8dc8c4767bf0a00392176"
1964dependencies = [2460dependencies = [
1965 "bytes 0.4.12",2461 "bytes 0.4.12",
1966 "globset",2462 "globset",
19742470
1975[[package]]2471[[package]]
1976name = "jsonrpc-ws-server"2472name = "jsonrpc-ws-server"
1977version = "14.2.0"2473version = "15.1.0"
1978source = "registry+https://github.com/rust-lang/crates.io-index"2474source = "registry+https://github.com/rust-lang/crates.io-index"
1979checksum = "903d3109fe7c4acb932b567e1e607e0f524ed04741b09fb0e61841bc40a022fc"2475checksum = "6596fe75209b73a2a75ebe1dce4e60e03b88a2b25e8807b667597f6315150d22"
1980dependencies = [2476dependencies = [
1981 "jsonrpc-core",2477 "jsonrpc-core",
1982 "jsonrpc-server-utils",2478 "jsonrpc-server-utils",
1983 "log",2479 "log",
2480 "parity-ws",
1984 "parking_lot 0.10.2",2481 "parking_lot 0.10.2",
1985 "slab",2482 "slab",
1986 "ws",
1987]2483]
19882484
1989[[package]]2485[[package]]
20132509
2014[[package]]2510[[package]]
2015name = "kvdb"2511name = "kvdb"
2016version = "0.6.0"2512version = "0.8.0"
2017source = "registry+https://github.com/rust-lang/crates.io-index"2513source = "registry+https://github.com/rust-lang/crates.io-index"
2018checksum = "e763b2a9b500ba47948061d1e8bc3b5f03a8a1f067dbcf822a4d2c84d2b54a3a"2514checksum = "92312348daade49976a6dc59263ad39ed54f840aacb5664874f7c9aa16e5f848"
2019dependencies = [2515dependencies = [
2020 "parity-util-mem",2516 "parity-util-mem",
2021 "smallvec 1.4.1",2517 "smallvec 1.6.1",
2022]2518]
20232519
2024[[package]]2520[[package]]
2025name = "kvdb-memorydb"2521name = "kvdb-memorydb"
2026version = "0.6.0"2522version = "0.8.0"
2027source = "registry+https://github.com/rust-lang/crates.io-index"2523source = "registry+https://github.com/rust-lang/crates.io-index"
2028checksum = "73027d5e228de6f503b5b7335d530404fc26230a6ae3e09b33ec6e45408509a4"2524checksum = "986052a8d16c692eaebe775391f9a3ac26714f3907132658500b601dec94c8c2"
2029dependencies = [2525dependencies = [
2030 "kvdb",2526 "kvdb",
2031 "parity-util-mem",2527 "parity-util-mem",
2032 "parking_lot 0.10.2",2528 "parking_lot 0.11.1",
2033]2529]
20342530
2035[[package]]2531[[package]]
2036name = "kvdb-rocksdb"2532name = "kvdb-rocksdb"
2037version = "0.8.0"2533version = "0.10.0"
2038source = "registry+https://github.com/rust-lang/crates.io-index"2534source = "registry+https://github.com/rust-lang/crates.io-index"
2039checksum = "84384eca250c7ff67877eda5336f28a86586aaee24acb945643590671f6bfce1"2535checksum = "8d92c36be64baba5ea549116ff0d7ffd445456a7be8aaee21ec05882b980cd11"
2040dependencies = [2536dependencies = [
2041 "fs-swap",2537 "fs-swap",
2042 "kvdb",2538 "kvdb",
2043 "log",2539 "log",
2044 "num_cpus",2540 "num_cpus",
2045 "owning_ref",2541 "owning_ref",
2046 "parity-util-mem",2542 "parity-util-mem",
2047 "parking_lot 0.10.2",2543 "parking_lot 0.11.1",
2048 "regex",2544 "regex",
2049 "rocksdb",2545 "rocksdb",
2050 "smallvec 1.4.1",2546 "smallvec 1.6.1",
2051]2547]
20522548
2053[[package]]2549[[package]]
20582554
2059[[package]]2555[[package]]
2060name = "lazycell"2556name = "lazycell"
2061version = "1.2.1"2557version = "1.3.0"
2062source = "registry+https://github.com/rust-lang/crates.io-index"2558source = "registry+https://github.com/rust-lang/crates.io-index"
2063checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"2559checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
20642560
2065[[package]]2561[[package]]
2066name = "libc"2562name = "leb128"
2067version = "0.2.73"2563version = "0.2.4"
2068source = "registry+https://github.com/rust-lang/crates.io-index"2564source = "registry+https://github.com/rust-lang/crates.io-index"
2069checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9"2565checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a"
20702566
2071[[package]]2567[[package]]
2072name = "libflate"2568name = "libc"
2073version = "1.0.2"2569version = "0.2.86"
2074source = "registry+https://github.com/rust-lang/crates.io-index"2570source = "registry+https://github.com/rust-lang/crates.io-index"
2075checksum = "e9bac9023e1db29c084f9f8cd9d3852e5e8fddf98fb47c4964a0ea4663d95949"2571checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
2076dependencies = [
2077 "adler32",
2078 "crc32fast",
2079 "libflate_lz77",
2080 "rle-decode-fast",
2081]
20822572
2083[[package]]2573[[package]]
2084name = "libflate_lz77"
2085version = "1.0.0"
2086source = "registry+https://github.com/rust-lang/crates.io-index"
2087checksum = "3286f09f7d4926fc486334f28d8d2e6ebe4f7f9994494b6dab27ddfad2c9b11b"
2088
2089[[package]]
2090name = "libloading"2574name = "libloading"
2091version = "0.5.2"2575version = "0.5.2"
2092source = "registry+https://github.com/rust-lang/crates.io-index"2576source = "registry+https://github.com/rust-lang/crates.io-index"
21042588
2105[[package]]2589[[package]]
2106name = "libp2p"2590name = "libp2p"
2107version = "0.19.1"2591version = "0.34.0"
2108source = "registry+https://github.com/rust-lang/crates.io-index"2592source = "registry+https://github.com/rust-lang/crates.io-index"
2109checksum = "057eba5432d3e740e313c6e13c9153d0cb76b4f71bfc2e5242ae5bdb7d41af67"2593checksum = "d5133112ce42be9482f6a87be92a605dd6bbc9e93c297aee77d172ff06908f3a"
2110dependencies = [2594dependencies = [
2111 "bytes 0.5.6",2595 "atomic",
2596 "bytes 1.0.1",
2112 "futures 0.3.5",2597 "futures 0.3.12",
2113 "lazy_static",2598 "lazy_static",
2114 "libp2p-core",2599 "libp2p-core",
2115 "libp2p-core-derive",2600 "libp2p-core-derive",
2601 "libp2p-deflate",
2116 "libp2p-dns",2602 "libp2p-dns",
2603 "libp2p-floodsub",
2604 "libp2p-gossipsub",
2117 "libp2p-identify",2605 "libp2p-identify",
2118 "libp2p-kad",2606 "libp2p-kad",
2119 "libp2p-mdns",2607 "libp2p-mdns",
2120 "libp2p-mplex",2608 "libp2p-mplex",
2121 "libp2p-noise",2609 "libp2p-noise",
2122 "libp2p-ping",2610 "libp2p-ping",
2611 "libp2p-plaintext",
2612 "libp2p-pnet",
2613 "libp2p-request-response",
2123 "libp2p-swarm",2614 "libp2p-swarm",
2124 "libp2p-tcp",2615 "libp2p-tcp",
2616 "libp2p-uds",
2125 "libp2p-wasm-ext",2617 "libp2p-wasm-ext",
2126 "libp2p-websocket",2618 "libp2p-websocket",
2127 "libp2p-yamux",2619 "libp2p-yamux",
2128 "multihash",2620 "parity-multiaddr",
2129 "parity-multiaddr 0.9.1",
2130 "parking_lot 0.10.2",2621 "parking_lot 0.11.1",
2131 "pin-project",2622 "pin-project 1.0.5",
2132 "smallvec 1.4.1",2623 "smallvec 1.6.1",
2133 "wasm-timer",2624 "wasm-timer",
2134]2625]
21352626
2136[[package]]2627[[package]]
2137name = "libp2p-core"2628name = "libp2p-core"
2138version = "0.19.2"2629version = "0.27.1"
2139source = "registry+https://github.com/rust-lang/crates.io-index"2630source = "registry+https://github.com/rust-lang/crates.io-index"
2140checksum = "3a0387b930c3d4c2533dc4893c1e0394185ddcc019846121b1b27491e45a2c08"2631checksum = "8a2d56aadc2c2bf22cd7797f86e56a65b5b3994a0136b65be3106938acae7a26"
2141dependencies = [2632dependencies = [
2142 "asn1_der",2633 "asn1_der",
2143 "bs58",2634 "bs58",
2144 "ed25519-dalek",2635 "ed25519-dalek",
2145 "either",2636 "either",
2146 "fnv",2637 "fnv",
2147 "futures 0.3.5",2638 "futures 0.3.12",
2148 "futures-timer 3.0.2",2639 "futures-timer 3.0.2",
2149 "lazy_static",2640 "lazy_static",
2150 "libsecp256k1",2641 "libsecp256k1",
2151 "log",2642 "log",
2152 "multihash",2643 "multihash",
2153 "multistream-select",2644 "multistream-select",
2154 "parity-multiaddr 0.9.1",2645 "parity-multiaddr",
2155 "parking_lot 0.10.2",2646 "parking_lot 0.11.1",
2156 "pin-project",2647 "pin-project 1.0.5",
2157 "prost",2648 "prost",
2158 "prost-build",2649 "prost-build",
2159 "rand 0.7.3",2650 "rand 0.7.3",
2160 "ring",2651 "ring",
2161 "rw-stream-sink",2652 "rw-stream-sink",
2162 "sha2 0.8.2",2653 "sha2 0.9.3",
2163 "smallvec 1.4.1",2654 "smallvec 1.6.1",
2164 "thiserror",2655 "thiserror",
2165 "unsigned-varint 0.4.0",2656 "unsigned-varint 0.7.0",
2166 "void",2657 "void",
2167 "zeroize",2658 "zeroize",
2168]2659]
21692660
2170[[package]]2661[[package]]
2171name = "libp2p-core-derive"2662name = "libp2p-core-derive"
2172version = "0.19.1"2663version = "0.21.0"
2173source = "registry+https://github.com/rust-lang/crates.io-index"2664source = "registry+https://github.com/rust-lang/crates.io-index"
2174checksum = "f09548626b737ed64080fde595e06ce1117795b8b9fc4d2629fa36561c583171"2665checksum = "f4bc40943156e42138d22ed3c57ff0e1a147237742715937622a99b10fbe0156"
2175dependencies = [2666dependencies = [
2176 "quote 1.0.7",2667 "quote",
2177 "syn 1.0.34",2668 "syn",
2178]2669]
21792670
2180[[package]]2671[[package]]
2672name = "libp2p-deflate"
2673version = "0.27.1"
2674source = "registry+https://github.com/rust-lang/crates.io-index"
2675checksum = "6d42eed63305f0420736fa487f9acef720c4528bd7852a6a760f5ccde4813345"
2676dependencies = [
2677 "flate2",
2678 "futures 0.3.12",
2679 "libp2p-core",
2680]
2681
2682[[package]]
2181name = "libp2p-dns"2683name = "libp2p-dns"
2182version = "0.19.0"2684version = "0.27.0"
2183source = "registry+https://github.com/rust-lang/crates.io-index"2685source = "registry+https://github.com/rust-lang/crates.io-index"
2184checksum = "3cc186d9a941fd0207cf8f08ef225a735e2d7296258f570155e525f6ee732f87"2686checksum = "5153b6db68fd4baa3b304e377db744dd8fea8ff4e4504509ee636abcde88d3e3"
2185dependencies = [2687dependencies = [
2186 "futures 0.3.5",2688 "futures 0.3.12",
2187 "libp2p-core",2689 "libp2p-core",
2188 "log",2690 "log",
2189]2691]
21902692
2191[[package]]2693[[package]]
2694name = "libp2p-floodsub"
2695version = "0.27.0"
2696source = "registry+https://github.com/rust-lang/crates.io-index"
2697checksum = "b3c63dfa06581b24b1d12bf9815b43689a784424be217d6545c800c7c75a207f"
2698dependencies = [
2699 "cuckoofilter",
2700 "fnv",
2701 "futures 0.3.12",
2702 "libp2p-core",
2703 "libp2p-swarm",
2704 "log",
2705 "prost",
2706 "prost-build",
2707 "rand 0.7.3",
2708 "smallvec 1.6.1",
2709]
2710
2711[[package]]
2712name = "libp2p-gossipsub"
2713version = "0.27.0"
2714source = "registry+https://github.com/rust-lang/crates.io-index"
2715checksum = "12451ba9493e87c91baf2a6dffce9ddf1fbc807a0861532d7cf477954f8ebbee"
2716dependencies = [
2717 "asynchronous-codec 0.5.0",
2718 "base64 0.13.0",
2719 "byteorder",
2720 "bytes 1.0.1",
2721 "fnv",
2722 "futures 0.3.12",
2723 "hex_fmt",
2724 "libp2p-core",
2725 "libp2p-swarm",
2726 "log",
2727 "prost",
2728 "prost-build",
2729 "rand 0.7.3",
2730 "regex",
2731 "sha2 0.9.3",
2732 "smallvec 1.6.1",
2733 "unsigned-varint 0.6.0",
2734 "wasm-timer",
2735]
2736
2737[[package]]
2192name = "libp2p-identify"2738name = "libp2p-identify"
2193version = "0.19.2"2739version = "0.27.0"
2194source = "registry+https://github.com/rust-lang/crates.io-index"2740source = "registry+https://github.com/rust-lang/crates.io-index"
2195checksum = "62f76075b170d908bae616f550ade410d9d27c013fa69042551dbfc757c7c094"2741checksum = "b40fb36a059b7a8cce1514bd8b546fa612e006c9937caa7f5950cb20021fe91e"
2196dependencies = [2742dependencies = [
2197 "futures 0.3.5",2743 "futures 0.3.12",
2198 "libp2p-core",2744 "libp2p-core",
2199 "libp2p-swarm",2745 "libp2p-swarm",
2200 "log",2746 "log",
2201 "prost",2747 "prost",
2202 "prost-build",2748 "prost-build",
2203 "smallvec 1.4.1",2749 "smallvec 1.6.1",
2204 "wasm-timer",2750 "wasm-timer",
2205]2751]
22062752
2207[[package]]2753[[package]]
2208name = "libp2p-kad"2754name = "libp2p-kad"
2209version = "0.19.0"2755version = "0.28.1"
2210source = "registry+https://github.com/rust-lang/crates.io-index"2756source = "registry+https://github.com/rust-lang/crates.io-index"
2211checksum = "41d6c1d5100973527ae70d82687465b17049c1b717a7964de38b8e65000878ff"2757checksum = "cf3da6c9acbcc05f93235d201d7d45ef4e8b88a45d8836f98becd8b4d443f066"
2212dependencies = [2758dependencies = [
2213 "arrayvec 0.5.1",2759 "arrayvec 0.5.2",
2214 "bytes 0.5.6",2760 "asynchronous-codec 0.6.0",
2761 "bytes 1.0.1",
2215 "either",2762 "either",
2216 "fnv",2763 "fnv",
2217 "futures 0.3.5",2764 "futures 0.3.12",
2218 "futures_codec 0.3.4",
2219 "libp2p-core",2765 "libp2p-core",
2220 "libp2p-swarm",2766 "libp2p-swarm",
2221 "log",2767 "log",
2222 "multihash",
2223 "prost",2768 "prost",
2224 "prost-build",2769 "prost-build",
2225 "rand 0.7.3",2770 "rand 0.7.3",
2226 "sha2 0.8.2",2771 "sha2 0.9.3",
2227 "smallvec 1.4.1",2772 "smallvec 1.6.1",
2228 "uint",2773 "uint",
2229 "unsigned-varint 0.3.3",2774 "unsigned-varint 0.7.0",
2230 "void",2775 "void",
2231 "wasm-timer",2776 "wasm-timer",
2232]2777]
22332778
2234[[package]]2779[[package]]
2235name = "libp2p-mdns"2780name = "libp2p-mdns"
2236version = "0.19.2"2781version = "0.28.1"
2237source = "registry+https://github.com/rust-lang/crates.io-index"2782source = "registry+https://github.com/rust-lang/crates.io-index"
2238checksum = "7f55b2d4b80986e5bf158270ab23268ec0e7f644ece5436fbaabc5155472f357"2783checksum = "0e9e6374814d1b118d97ccabdfc975c8910bd16dc38a8bc058eeb08bf2080fe1"
2239dependencies = [2784dependencies = [
2240 "async-std",2785 "async-io",
2241 "data-encoding",2786 "data-encoding",
2242 "dns-parser",2787 "dns-parser",
2243 "either",2788 "futures 0.3.12",
2244 "futures 0.3.5",2789 "if-watch",
2245 "lazy_static",2790 "lazy_static",
2246 "libp2p-core",2791 "libp2p-core",
2247 "libp2p-swarm",2792 "libp2p-swarm",
2248 "log",2793 "log",
2249 "net2",
2250 "rand 0.7.3",2794 "rand 0.7.3",
2251 "smallvec 1.4.1",2795 "smallvec 1.6.1",
2796 "socket2",
2252 "void",2797 "void",
2253 "wasm-timer",
2254]2798]
22552799
2256[[package]]2800[[package]]
2257name = "libp2p-mplex"2801name = "libp2p-mplex"
2258version = "0.19.2"2802version = "0.27.1"
2259source = "registry+https://github.com/rust-lang/crates.io-index"2803source = "registry+https://github.com/rust-lang/crates.io-index"
2260checksum = "be7d913a4cd57de2013257ec73f07d77bfce390b370023e2d59083e5ca079864"2804checksum = "350ce8b3923594aedabd5d6e3f875d058435052a29c3f32df378bc70d10be464"
2261dependencies = [2805dependencies = [
2262 "bytes 0.5.6",2806 "asynchronous-codec 0.6.0",
2263 "fnv",2807 "bytes 1.0.1",
2264 "futures 0.3.5",
2265 "futures_codec 0.4.1",2808 "futures 0.3.12",
2266 "libp2p-core",2809 "libp2p-core",
2267 "log",2810 "log",
2268 "parking_lot 0.10.2",2811 "nohash-hasher",
2812 "parking_lot 0.11.1",
2813 "rand 0.7.3",
2814 "smallvec 1.6.1",
2269 "unsigned-varint 0.4.0",2815 "unsigned-varint 0.7.0",
2270]2816]
22712817
2272[[package]]2818[[package]]
2273name = "libp2p-noise"2819name = "libp2p-noise"
2274version = "0.19.1"2820version = "0.29.0"
2275source = "registry+https://github.com/rust-lang/crates.io-index"2821source = "registry+https://github.com/rust-lang/crates.io-index"
2276checksum = "a03db664653369f46ee03fcec483a378c20195089bb43a26cb9fb0058009ac88"2822checksum = "4aca322b52a0c5136142a7c3971446fb1e9964923a526c9cc6ef3b7c94e57778"
2277dependencies = [2823dependencies = [
2278 "curve25519-dalek",2824 "bytes 1.0.1",
2825 "curve25519-dalek 3.0.2",
2279 "futures 0.3.5",2826 "futures 0.3.12",
2280 "lazy_static",2827 "lazy_static",
2281 "libp2p-core",2828 "libp2p-core",
2282 "log",2829 "log",
2283 "prost",2830 "prost",
2284 "prost-build",2831 "prost-build",
2285 "rand 0.7.3",2832 "rand 0.7.3",
2286 "sha2 0.8.2",2833 "sha2 0.9.3",
2287 "snow",2834 "snow",
2288 "static_assertions",2835 "static_assertions",
2289 "x25519-dalek",2836 "x25519-dalek",
22922839
2293[[package]]2840[[package]]
2294name = "libp2p-ping"2841name = "libp2p-ping"
2295version = "0.19.3"2842version = "0.27.0"
2296source = "registry+https://github.com/rust-lang/crates.io-index"2843source = "registry+https://github.com/rust-lang/crates.io-index"
2297checksum = "b8dedd34e35a9728d52d59ef36a218e411359a353f9011b2574b86ee790978f6"2844checksum = "6f3813276d0708c8db0f500d8beda1bda9ad955723b9cb272c41f4727256f73c"
2298dependencies = [2845dependencies = [
2299 "futures 0.3.5",2846 "futures 0.3.12",
2300 "libp2p-core",2847 "libp2p-core",
2301 "libp2p-swarm",2848 "libp2p-swarm",
2302 "log",2849 "log",
2306]2853]
23072854
2308[[package]]2855[[package]]
2856name = "libp2p-plaintext"
2857version = "0.27.1"
2858source = "registry+https://github.com/rust-lang/crates.io-index"
2859checksum = "9d58defcadb646ae4b033e130b48d87410bf76394dc3335496cae99dac803e61"
2860dependencies = [
2861 "asynchronous-codec 0.6.0",
2862 "bytes 1.0.1",
2863 "futures 0.3.12",
2864 "libp2p-core",
2865 "log",
2866 "prost",
2867 "prost-build",
2868 "unsigned-varint 0.7.0",
2869 "void",
2870]
2871
2872[[package]]
2873name = "libp2p-pnet"
2874version = "0.20.0"
2875source = "registry+https://github.com/rust-lang/crates.io-index"
2876checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599"
2877dependencies = [
2878 "futures 0.3.12",
2879 "log",
2880 "pin-project 1.0.5",
2881 "rand 0.7.3",
2882 "salsa20",
2883 "sha3",
2884]
2885
2886[[package]]
2887name = "libp2p-request-response"
2888version = "0.9.1"
2889source = "registry+https://github.com/rust-lang/crates.io-index"
2890checksum = "10e5552827c33d8326502682da73a0ba4bfa40c1b55b216af3c303f32169dd89"
2891dependencies = [
2892 "async-trait",
2893 "bytes 1.0.1",
2894 "futures 0.3.12",
2895 "libp2p-core",
2896 "libp2p-swarm",
2897 "log",
2898 "lru",
2899 "minicbor",
2900 "rand 0.7.3",
2901 "smallvec 1.6.1",
2902 "unsigned-varint 0.7.0",
2903 "wasm-timer",
2904]
2905
2906[[package]]
2309name = "libp2p-swarm"2907name = "libp2p-swarm"
2310version = "0.19.1"2908version = "0.27.2"
2311source = "registry+https://github.com/rust-lang/crates.io-index"2909source = "registry+https://github.com/rust-lang/crates.io-index"
2312checksum = "ce53ff4d127cf8b39adf84dbd381ca32d49bd85788cee08e6669da2495993930"2910checksum = "7955b973e1fd2bd61ffd43ce261c1223f61f4aacd5bae362a924993f9a25fd98"
2313dependencies = [2911dependencies = [
2314 "futures 0.3.5",2912 "either",
2913 "futures 0.3.12",
2315 "libp2p-core",2914 "libp2p-core",
2316 "log",2915 "log",
2317 "rand 0.7.3",2916 "rand 0.7.3",
2318 "smallvec 1.4.1",2917 "smallvec 1.6.1",
2319 "void",2918 "void",
2320 "wasm-timer",2919 "wasm-timer",
2321]2920]
23222921
2323[[package]]2922[[package]]
2324name = "libp2p-tcp"2923name = "libp2p-tcp"
2325version = "0.19.2"2924version = "0.27.1"
2326source = "registry+https://github.com/rust-lang/crates.io-index"2925source = "registry+https://github.com/rust-lang/crates.io-index"
2327checksum = "9481500c5774c62e8c413e9535b3f33a0e3dbacf2da63b8d3056c686a9df4146"2926checksum = "88a5aef80e519a6cb8e2663605142f97baaaea1a252eecbf8756184765f7471b"
2328dependencies = [2927dependencies = [
2329 "async-std",2928 "async-io",
2330 "futures 0.3.5",2929 "futures 0.3.12",
2331 "futures-timer 3.0.2",2930 "futures-timer 3.0.2",
2332 "get_if_addrs",2931 "if-watch",
2333 "ipnet",2932 "ipnet",
2933 "libc",
2334 "libp2p-core",2934 "libp2p-core",
2335 "log",2935 "log",
2336 "socket2",2936 "socket2",
2337]2937]
23382938
2339[[package]]2939[[package]]
2940name = "libp2p-uds"
2941version = "0.27.0"
2942source = "registry+https://github.com/rust-lang/crates.io-index"
2943checksum = "80ac51ce419f60be966e02103c17f67ff5dc4422ba83ba54d251d6c62a4ed487"
2944dependencies = [
2945 "async-std",
2946 "futures 0.3.12",
2947 "libp2p-core",
2948 "log",
2949]
2950
2951[[package]]
2340name = "libp2p-wasm-ext"2952name = "libp2p-wasm-ext"
2341version = "0.19.0"2953version = "0.27.0"
2342source = "registry+https://github.com/rust-lang/crates.io-index"2954source = "registry+https://github.com/rust-lang/crates.io-index"
2343checksum = "f59fdbb5706f2723ca108c088b1c7a37f735a8c328021f0508007162627e9885"2955checksum = "6149c46cb76935c80bc8be6ec6e3ebd5f5e1679765a255fb34331d54610f15dd"
2344dependencies = [2956dependencies = [
2345 "futures 0.3.5",2957 "futures 0.3.12",
2346 "js-sys",2958 "js-sys",
2347 "libp2p-core",2959 "libp2p-core",
2348 "parity-send-wrapper",2960 "parity-send-wrapper",
23522964
2353[[package]]2965[[package]]
2354name = "libp2p-websocket"2966name = "libp2p-websocket"
2355version = "0.19.0"2967version = "0.28.0"
2356source = "registry+https://github.com/rust-lang/crates.io-index"2968source = "registry+https://github.com/rust-lang/crates.io-index"
2357checksum = "085fbe4c05c4116c2164ab4d5a521eb6e00516c444f61b3ee9f68c7b1e53580b"2969checksum = "d3b1c6a3431045da8b925ed83384e4c5163e14b990572307fca9c507435d4d22"
2358dependencies = [2970dependencies = [
2359 "async-tls",
2360 "bytes 0.5.6",
2361 "either",2971 "either",
2362 "futures 0.3.5",2972 "futures 0.3.12",
2973 "futures-rustls",
2363 "libp2p-core",2974 "libp2p-core",
2364 "log",2975 "log",
2365 "quicksink",2976 "quicksink",
2366 "rustls",
2367 "rw-stream-sink",2977 "rw-stream-sink",
2368 "soketto",2978 "soketto",
2369 "url 2.1.1",2979 "url 2.2.0",
2370 "webpki",2980 "webpki-roots",
2371 "webpki-roots 0.18.0",
2372]2981]
23732982
2374[[package]]2983[[package]]
2375name = "libp2p-yamux"2984name = "libp2p-yamux"
2376version = "0.19.1"2985version = "0.30.0"
2377source = "registry+https://github.com/rust-lang/crates.io-index"2986source = "registry+https://github.com/rust-lang/crates.io-index"
2378checksum = "8da33e7b5f49c75c6a8afb0b8d1e229f5fa48be9f39bd14cdbc21459a02ac6fc"2987checksum = "490b8b27fc40fe35212df1b6a3d14bffaa4117cbff956fdc2892168a371102ad"
2379dependencies = [2988dependencies = [
2380 "futures 0.3.5",2989 "futures 0.3.12",
2381 "libp2p-core",2990 "libp2p-core",
2382 "parking_lot 0.10.2",2991 "parking_lot 0.11.1",
2383 "thiserror",2992 "thiserror",
2384 "yamux",2993 "yamux",
2385]2994]
23862995
2387[[package]]2996[[package]]
2388name = "librocksdb-sys"2997name = "librocksdb-sys"
2389version = "6.7.4"2998version = "6.11.4"
2390source = "registry+https://github.com/rust-lang/crates.io-index"2999source = "registry+https://github.com/rust-lang/crates.io-index"
2391checksum = "883213ae3d09bfc3d104aefe94b25ebb183b6f4d3a515b23b14817e1f4854005"3000checksum = "eb5b56f651c204634b936be2f92dbb42c36867e00ff7fe2405591f3b9fa66f09"
2392dependencies = [3001dependencies = [
2393 "bindgen",3002 "bindgen",
2394 "cc",3003 "cc",
2408 "hmac-drbg",3017 "hmac-drbg",
2409 "rand 0.7.3",3018 "rand 0.7.3",
2410 "sha2 0.8.2",3019 "sha2 0.8.2",
2411 "subtle 2.2.3",3020 "subtle 2.4.0",
2412 "typenum",3021 "typenum",
2413]3022]
24143023
2415[[package]]3024[[package]]
2416name = "libz-sys"3025name = "libz-sys"
2417version = "1.0.25"3026version = "1.1.2"
2418source = "registry+https://github.com/rust-lang/crates.io-index"3027source = "registry+https://github.com/rust-lang/crates.io-index"
2419checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"3028checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
2420dependencies = [3029dependencies = [
2421 "cc",3030 "cc",
2422 "libc",
2423 "pkg-config",3031 "pkg-config",
2424 "vcpkg",3032 "vcpkg",
2425]3033]
24263034
2427[[package]]3035[[package]]
2428name = "linked-hash-map"3036name = "linked-hash-map"
2429version = "0.5.3"3037version = "0.5.4"
2430source = "registry+https://github.com/rust-lang/crates.io-index"3038source = "registry+https://github.com/rust-lang/crates.io-index"
2431checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a"3039checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
24323040
2433[[package]]3041[[package]]
2434name = "linked_hash_set"3042name = "linked_hash_set"
2435version = "0.1.3"3043version = "0.1.4"
2436source = "registry+https://github.com/rust-lang/crates.io-index"3044source = "registry+https://github.com/rust-lang/crates.io-index"
2437checksum = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c"3045checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588"
2438dependencies = [3046dependencies = [
2439 "linked-hash-map",3047 "linked-hash-map",
2440]3048]
24413049
2442[[package]]3050[[package]]
2443name = "linregress"3051name = "linregress"
2444version = "0.1.7"3052version = "0.4.0"
2445source = "registry+https://github.com/rust-lang/crates.io-index"3053source = "registry+https://github.com/rust-lang/crates.io-index"
2446checksum = "9290cf6f928576eeb9c096c6fad9d8d452a0a1a70a2bbffa6e36064eedc0aac9"3054checksum = "0d0ad4b5cc8385a881c561fac3501353d63d2a2b7a357b5064d71815c9a92724"
2447dependencies = [3055dependencies = [
2448 "failure",
2449 "nalgebra",3056 "nalgebra",
2450 "statrs",3057 "statrs",
2451]3058]
2460]3067]
24613068
2462[[package]]3069[[package]]
3070name = "lock_api"
3071version = "0.4.2"
3072source = "registry+https://github.com/rust-lang/crates.io-index"
3073checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312"
3074dependencies = [
3075 "scopeguard",
3076]
3077
3078[[package]]
2463name = "log"3079name = "log"
2464version = "0.4.11"3080version = "0.4.14"
2465source = "registry+https://github.com/rust-lang/crates.io-index"3081source = "registry+https://github.com/rust-lang/crates.io-index"
2466checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"3082checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
2467dependencies = [3083dependencies = [
2468 "cfg-if",3084 "cfg-if 1.0.0",
3085 "value-bag",
2469]3086]
24703087
2471[[package]]3088[[package]]
2472name = "lru"3089name = "lru"
2473version = "0.4.3"3090version = "0.6.5"
2474source = "registry+https://github.com/rust-lang/crates.io-index"3091source = "registry+https://github.com/rust-lang/crates.io-index"
2475checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237"3092checksum = "1f374d42cdfc1d7dbf3d3dec28afab2eb97ffbf43a3234d795b5986dbf4b90ba"
2476dependencies = [3093dependencies = [
2477 "hashbrown 0.6.3",3094 "hashbrown",
2478]3095]
24793096
2480[[package]]3097[[package]]
3098name = "mach"
3099version = "0.3.2"
3100source = "registry+https://github.com/rust-lang/crates.io-index"
3101checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
3102dependencies = [
3103 "libc",
3104]
3105
3106[[package]]
3107name = "maplit"
3108version = "1.0.2"
3109source = "registry+https://github.com/rust-lang/crates.io-index"
3110checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
3111
3112[[package]]
3113name = "matchers"
3114version = "0.0.1"
3115source = "registry+https://github.com/rust-lang/crates.io-index"
3116checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"
3117dependencies = [
3118 "regex-automata",
3119]
3120
3121[[package]]
2481name = "matches"3122name = "matches"
2482version = "0.1.8"3123version = "0.1.8"
2483source = "registry+https://github.com/rust-lang/crates.io-index"3124source = "registry+https://github.com/rust-lang/crates.io-index"
2484checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"3125checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
24853126
2486[[package]]3127[[package]]
2487name = "matrixmultiply"3128name = "matrixmultiply"
2488version = "0.2.3"3129version = "0.2.4"
2489source = "registry+https://github.com/rust-lang/crates.io-index"3130source = "registry+https://github.com/rust-lang/crates.io-index"
2490checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f"3131checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1"
2491dependencies = [3132dependencies = [
2492 "rawpointer",3133 "rawpointer",
2493]3134]
25003141
2501[[package]]3142[[package]]
2502name = "memchr"3143name = "memchr"
2503version = "2.3.3"3144version = "2.3.4"
2504source = "registry+https://github.com/rust-lang/crates.io-index"3145source = "registry+https://github.com/rust-lang/crates.io-index"
2505checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"3146checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
25063147
2507[[package]]3148[[package]]
2508name = "memmap"3149name = "memmap"
25163157
2517[[package]]3158[[package]]
2518name = "memoffset"3159name = "memoffset"
2519version = "0.5.5"3160version = "0.5.6"
2520source = "registry+https://github.com/rust-lang/crates.io-index"3161source = "registry+https://github.com/rust-lang/crates.io-index"
2521checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f"3162checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa"
2522dependencies = [3163dependencies = [
2523 "autocfg 1.0.0",3164 "autocfg",
2524]3165]
25253166
2526[[package]]3167[[package]]
3168name = "memoffset"
3169version = "0.6.1"
3170source = "registry+https://github.com/rust-lang/crates.io-index"
3171checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87"
3172dependencies = [
3173 "autocfg",
3174]
3175
3176[[package]]
2527name = "memory-db"3177name = "memory-db"
2528version = "0.21.0"3178version = "0.25.0"
2529source = "registry+https://github.com/rust-lang/crates.io-index"3179source = "registry+https://github.com/rust-lang/crates.io-index"
2530checksum = "fb2999ff7a65d5a1d72172f6d51fa2ea03024b51aee709ba5ff81c3c629a2410"3180checksum = "6cbd2a22f201c03cc1706a727842490abfea17b7b53260358239828208daba3c"
2531dependencies = [3181dependencies = [
2532 "ahash",
2533 "hash-db",3182 "hash-db",
2534 "hashbrown 0.6.3",3183 "hashbrown",
2535 "parity-util-mem",3184 "parity-util-mem",
2536]3185]
25373186
25433192
2544[[package]]3193[[package]]
2545name = "merlin"3194name = "merlin"
2546version = "2.0.0"3195version = "2.0.1"
2547source = "registry+https://github.com/rust-lang/crates.io-index"3196source = "registry+https://github.com/rust-lang/crates.io-index"
2548checksum = "c6feca46f4fa3443a01769d768727f10c10a20fdb65e52dc16a81f0c8269bb78"3197checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42"
2549dependencies = [3198dependencies = [
2550 "byteorder",3199 "byteorder",
2551 "keccak",3200 "keccak",
2554]3203]
25553204
2556[[package]]3205[[package]]
3206name = "minicbor"
3207version = "0.7.1"
3208source = "registry+https://github.com/rust-lang/crates.io-index"
3209checksum = "3265a9f5210bb726f81ef9c456ae0aff5321cd95748c0e71889b0e19d8f0332b"
3210dependencies = [
3211 "minicbor-derive",
3212]
3213
3214[[package]]
3215name = "minicbor-derive"
3216version = "0.6.1"
3217source = "registry+https://github.com/rust-lang/crates.io-index"
3218checksum = "130b9455e28a3f308f6579671816a6f2621e2e0cbf55dc2f886345bef699481e"
3219dependencies = [
3220 "proc-macro2",
3221 "quote",
3222 "syn",
3223]
3224
3225[[package]]
2557name = "miniz_oxide"3226name = "miniz_oxide"
2558version = "0.4.0"3227version = "0.4.3"
2559source = "registry+https://github.com/rust-lang/crates.io-index"3228source = "registry+https://github.com/rust-lang/crates.io-index"
2560checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f"3229checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d"
2561dependencies = [3230dependencies = [
2562 "adler",3231 "adler",
3232 "autocfg",
2563]3233]
25643234
2565[[package]]3235[[package]]
2566name = "mio"3236name = "mio"
2567version = "0.6.22"3237version = "0.6.23"
2568source = "registry+https://github.com/rust-lang/crates.io-index"3238source = "registry+https://github.com/rust-lang/crates.io-index"
2569checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430"3239checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4"
2570dependencies = [3240dependencies = [
2571 "cfg-if",3241 "cfg-if 0.1.10",
2572 "fuchsia-zircon",3242 "fuchsia-zircon",
2573 "fuchsia-zircon-sys",3243 "fuchsia-zircon-sys",
2574 "iovec",3244 "iovec",
2575 "kernel32-sys",3245 "kernel32-sys",
2576 "libc",3246 "libc",
2577 "log",3247 "log",
2578 "miow 0.2.1",3248 "miow 0.2.2",
2579 "net2",3249 "net2",
2580 "slab",3250 "slab",
2581 "winapi 0.2.8",3251 "winapi 0.2.8",
2601dependencies = [3271dependencies = [
2602 "log",3272 "log",
2603 "mio",3273 "mio",
2604 "miow 0.3.5",3274 "miow 0.3.6",
2605 "winapi 0.3.9",3275 "winapi 0.3.9",
2606]3276]
26073277
26183288
2619[[package]]3289[[package]]
2620name = "miow"3290name = "miow"
2621version = "0.2.1"3291version = "0.2.2"
2622source = "registry+https://github.com/rust-lang/crates.io-index"3292source = "registry+https://github.com/rust-lang/crates.io-index"
2623checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"3293checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d"
2624dependencies = [3294dependencies = [
2625 "kernel32-sys",3295 "kernel32-sys",
2626 "net2",3296 "net2",
26303300
2631[[package]]3301[[package]]
2632name = "miow"3302name = "miow"
2633version = "0.3.5"3303version = "0.3.6"
2634source = "registry+https://github.com/rust-lang/crates.io-index"3304source = "registry+https://github.com/rust-lang/crates.io-index"
2635checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e"3305checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897"
2636dependencies = [3306dependencies = [
2637 "socket2",3307 "socket2",
2638 "winapi 0.3.9",3308 "winapi 0.3.9",
2639]3309]
26403310
2641[[package]]3311[[package]]
3312name = "more-asserts"
3313version = "0.2.1"
3314source = "registry+https://github.com/rust-lang/crates.io-index"
3315checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238"
3316
3317[[package]]
2642name = "multihash"3318name = "multihash"
2643version = "0.11.2"3319version = "0.13.2"
2644source = "registry+https://github.com/rust-lang/crates.io-index"3320source = "registry+https://github.com/rust-lang/crates.io-index"
2645checksum = "f75db05d738947aa5389863aadafbcf2e509d7ba099dc2ddcdf4fc66bf7a9e03"3321checksum = "4dac63698b887d2d929306ea48b63760431ff8a24fac40ddb22f9c7f49fb7cab"
2646dependencies = [3322dependencies = [
2647 "blake2b_simd",3323 "digest 0.9.0",
2648 "blake2s_simd",
2649 "digest 0.8.1",3324 "generic-array 0.14.4",
2650 "sha-1",3325 "multihash-derive",
2651 "sha2 0.8.2",3326 "sha2 0.9.3",
2652 "sha3",3327 "unsigned-varint 0.5.1",
2653 "unsigned-varint 0.3.3",
2654]3328]
26553329
2656[[package]]3330[[package]]
3331name = "multihash-derive"
3332version = "0.7.1"
3333source = "registry+https://github.com/rust-lang/crates.io-index"
3334checksum = "85ee3c48cb9d9b275ad967a0e96715badc13c6029adb92f34fa17b9ff28fd81f"
3335dependencies = [
3336 "proc-macro-crate",
3337 "proc-macro-error",
3338 "proc-macro2",
3339 "quote",
3340 "syn",
3341 "synstructure",
3342]
3343
3344[[package]]
2657name = "multimap"3345name = "multimap"
2658version = "0.8.1"3346version = "0.8.2"
2659source = "registry+https://github.com/rust-lang/crates.io-index"3347source = "registry+https://github.com/rust-lang/crates.io-index"
2660checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce"3348checksum = "1255076139a83bb467426e7f8d0134968a8118844faa755985e077cf31850333"
26613349
2662[[package]]3350[[package]]
2663name = "multistream-select"3351name = "multistream-select"
2664version = "0.8.2"3352version = "0.10.1"
2665source = "registry+https://github.com/rust-lang/crates.io-index"3353source = "registry+https://github.com/rust-lang/crates.io-index"
2666checksum = "c9157e87afbc2ef0d84cc0345423d715f445edde00141c93721c162de35a05e5"3354checksum = "5df70763c86c98487451f307e1b68b4100da9076f4c12146905fc2054277f4e8"
2667dependencies = [3355dependencies = [
2668 "bytes 0.5.6",3356 "bytes 1.0.1",
2669 "futures 0.3.5",3357 "futures 0.3.12",
2670 "log",3358 "log",
2671 "pin-project",3359 "pin-project 1.0.5",
2672 "smallvec 1.4.1",3360 "smallvec 1.6.1",
2673 "unsigned-varint 0.4.0",3361 "unsigned-varint 0.7.0",
2674]3362]
26753363
2676[[package]]3364[[package]]
2677name = "nalgebra"3365name = "nalgebra"
2678version = "0.18.1"3366version = "0.21.1"
2679source = "registry+https://github.com/rust-lang/crates.io-index"3367source = "registry+https://github.com/rust-lang/crates.io-index"
2680checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2"3368checksum = "d6b6147c3d50b4f3cdabfe2ecc94a0191fd3d6ad58aefd9664cf396285883486"
2681dependencies = [3369dependencies = [
2682 "alga",
2683 "approx",3370 "approx",
2684 "generic-array 0.12.3",3371 "generic-array 0.13.2",
2685 "matrixmultiply",3372 "matrixmultiply",
2686 "num-complex",3373 "num-complex",
2687 "num-rational",3374 "num-rational",
2688 "num-traits 0.2.12",3375 "num-traits",
3376 "rand 0.7.3",
2689 "rand 0.6.5",3377 "rand_distr",
3378 "simba",
2690 "typenum",3379 "typenum",
2691]3380]
26923381
2700]3389]
27013390
2702[[package]]3391[[package]]
2703name = "net2"3392name = "nb-connect"
2704version = "0.2.34"3393version = "1.0.3"
2705source = "registry+https://github.com/rust-lang/crates.io-index"3394source = "registry+https://github.com/rust-lang/crates.io-index"
2706checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7"3395checksum = "670361df1bc2399ee1ff50406a0d422587dd3bb0da596e1978fe8e05dabddf4f"
2707dependencies = [3396dependencies = [
2708 "cfg-if",
2709 "libc",3397 "libc",
2710 "winapi 0.3.9",3398 "socket2",
2711]3399]
27123400
2713[[package]]3401[[package]]
2714name = "netstat2"3402name = "net2"
2715version = "0.8.1"3403version = "0.2.37"
2716source = "registry+https://github.com/rust-lang/crates.io-index"3404source = "registry+https://github.com/rust-lang/crates.io-index"
2717checksum = "29449d242064c48d3057a194b049a2bdcccadda16faa18a91468677b44e8d422"3405checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae"
2718dependencies = [3406dependencies = [
2719 "bitflags",3407 "cfg-if 0.1.10",
2720 "byteorder",
2721 "enum-primitive-derive",
2722 "libc",3408 "libc",
2723 "num-traits 0.2.12",3409 "winapi 0.3.9",
2724 "thiserror",
2725]3410]
27263411
2727[[package]]3412[[package]]
2728name = "nft"3413name = "nft"
2729version = "2.0.0-rc4"3414version = "3.0.0"
2730dependencies = [3415dependencies = [
2731 "futures 0.3.5",3416 "flexi_logger",
3417 "frame-benchmarking",
3418 "frame-benchmarking-cli",
3419 "futures 0.3.12",
2732 "jsonrpc-core",3420 "jsonrpc-core",
2733 "log",3421 "log",
2734 "nft-runtime",3422 "nft-runtime",
2735 "pallet-contracts-rpc",3423 "pallet-contracts-rpc",
3424 "pallet-transaction-payment-rpc",
2736 "parking_lot 0.10.2",3425 "parking_lot 0.10.2",
2737 "sc-basic-authorship",3426 "sc-basic-authorship",
2738 "sc-cli",3427 "sc-cli",
2741 "sc-consensus-aura",3430 "sc-consensus-aura",
2742 "sc-executor",3431 "sc-executor",
2743 "sc-finality-grandpa",3432 "sc-finality-grandpa",
3433 "sc-keystore",
2744 "sc-network",3434 "sc-network",
2745 "sc-rpc",3435 "sc-rpc",
3436 "sc-rpc-api",
2746 "sc-service",3437 "sc-service",
3438 "sc-telemetry",
2747 "sc-transaction-pool",3439 "sc-transaction-pool",
3440 "serde",
3441 "serde_json",
3442 "sp-api",
3443 "sp-block-builder",
3444 "sp-blockchain",
2748 "sp-consensus",3445 "sp-consensus",
2749 "sp-consensus-aura",3446 "sp-consensus-aura",
2750 "sp-core",3447 "sp-core",
2754 "sp-transaction-pool",3451 "sp-transaction-pool",
2755 "structopt",3452 "structopt",
2756 "substrate-build-script-utils",3453 "substrate-build-script-utils",
3454 "substrate-frame-rpc-system",
2757]3455]
27583456
2759[[package]]3457[[package]]
2760name = "nft-runtime"3458name = "nft-runtime"
2761version = "2.0.0-rc4"3459version = "2.1.0"
2762dependencies = [3460dependencies = [
3461 "frame-benchmarking",
2763 "frame-executive",3462 "frame-executive",
2764 "frame-support",3463 "frame-support",
2765 "frame-system",3464 "frame-system",
3465 "frame-system-benchmarking",
3466 "frame-system-rpc-runtime-api",
3467 "hex-literal",
2766 "pallet-aura",3468 "pallet-aura",
2767 "pallet-balances",3469 "pallet-balances",
2768 "pallet-contracts",3470 "pallet-contracts",
2774 "pallet-sudo",3476 "pallet-sudo",
2775 "pallet-timestamp",3477 "pallet-timestamp",
2776 "pallet-transaction-payment",3478 "pallet-transaction-payment",
3479 "pallet-transaction-payment-rpc-runtime-api",
3480 "pallet-treasury",
3481 "pallet-vesting",
2777 "parity-scale-codec",3482 "parity-scale-codec",
2778 "serde",3483 "serde",
3484 "smallvec 1.6.1",
2779 "sp-api",3485 "sp-api",
3486 "sp-arithmetic",
2780 "sp-block-builder",3487 "sp-block-builder",
2781 "sp-consensus-aura",3488 "sp-consensus-aura",
2782 "sp-core",3489 "sp-core",
2783 "sp-inherents",3490 "sp-inherents",
2784 "sp-io",
2785 "sp-offchain",3491 "sp-offchain",
2786 "sp-runtime",3492 "sp-runtime",
2787 "sp-session",3493 "sp-session",
2792]3498]
27933499
2794[[package]]3500[[package]]
2795name = "nix"
2796version = "0.17.0"
2797source = "registry+https://github.com/rust-lang/crates.io-index"
2798checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363"
2799dependencies = [
2800 "bitflags",
2801 "cc",
2802 "cfg-if",
2803 "libc",
2804 "void",
2805]
2806
2807[[package]]
2808name = "nodrop"3501name = "nodrop"
2809version = "0.1.14"3502version = "0.1.14"
2810source = "registry+https://github.com/rust-lang/crates.io-index"3503source = "registry+https://github.com/rust-lang/crates.io-index"
2827]3520]
28283521
2829[[package]]3522[[package]]
2830name = "ntapi"
2831version = "0.3.4"
2832source = "registry+https://github.com/rust-lang/crates.io-index"
2833checksum = "7a31937dea023539c72ddae0e3571deadc1414b300483fa7aaec176168cfa9d2"
2834dependencies = [
2835 "winapi 0.3.9",
2836]
2837
2838[[package]]
2839name = "num-bigint"3523name = "num-bigint"
2840version = "0.2.6"3524version = "0.2.6"
2841source = "registry+https://github.com/rust-lang/crates.io-index"3525source = "registry+https://github.com/rust-lang/crates.io-index"
2842checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"3526checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"
2843dependencies = [3527dependencies = [
2844 "autocfg 1.0.0",3528 "autocfg",
2845 "num-integer",3529 "num-integer",
2846 "num-traits 0.2.12",3530 "num-traits",
2847]3531]
28483532
2849[[package]]3533[[package]]
2852source = "registry+https://github.com/rust-lang/crates.io-index"3536source = "registry+https://github.com/rust-lang/crates.io-index"
2853checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"3537checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"
2854dependencies = [3538dependencies = [
2855 "autocfg 1.0.0",3539 "autocfg",
2856 "num-traits 0.2.12",3540 "num-traits",
2857]3541]
28583542
2859[[package]]3543[[package]]
2860name = "num-integer"3544name = "num-integer"
2861version = "0.1.43"3545version = "0.1.44"
2862source = "registry+https://github.com/rust-lang/crates.io-index"3546source = "registry+https://github.com/rust-lang/crates.io-index"
2863checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b"3547checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
2864dependencies = [3548dependencies = [
2865 "autocfg 1.0.0",3549 "autocfg",
2866 "num-traits 0.2.12",3550 "num-traits",
2867]3551]
28683552
2869[[package]]3553[[package]]
2872source = "registry+https://github.com/rust-lang/crates.io-index"3556source = "registry+https://github.com/rust-lang/crates.io-index"
2873checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef"3557checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef"
2874dependencies = [3558dependencies = [
2875 "autocfg 1.0.0",3559 "autocfg",
2876 "num-bigint",3560 "num-bigint",
2877 "num-integer",3561 "num-integer",
2878 "num-traits 0.2.12",3562 "num-traits",
2879]3563]
28803564
2881[[package]]3565[[package]]
2882name = "num-traits"3566name = "num-traits"
2883version = "0.1.43"3567version = "0.2.14"
2884source = "registry+https://github.com/rust-lang/crates.io-index"3568source = "registry+https://github.com/rust-lang/crates.io-index"
2885checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"3569checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
2886dependencies = [3570dependencies = [
2887 "num-traits 0.2.12",3571 "autocfg",
2888]
2889
2890[[package]]
2891name = "num-traits"
2892version = "0.2.12"
2893source = "registry+https://github.com/rust-lang/crates.io-index"
2894checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611"
2895dependencies = [
2896 "autocfg 1.0.0",
2897 "libm",3572 "libm",
2898]3573]
28993574
29093584
2910[[package]]3585[[package]]
2911name = "object"3586name = "object"
3587version = "0.19.0"
3588source = "registry+https://github.com/rust-lang/crates.io-index"
3589checksum = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2"
3590
3591[[package]]
3592name = "object"
2912version = "0.20.0"3593version = "0.20.0"
2913source = "registry+https://github.com/rust-lang/crates.io-index"3594source = "registry+https://github.com/rust-lang/crates.io-index"
2914checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5"3595checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5"
3596dependencies = [
3597 "crc32fast",
3598 "indexmap",
3599 "wasmparser 0.57.0",
3600]
29153601
2916[[package]]3602[[package]]
3603name = "object"
3604version = "0.23.0"
3605source = "registry+https://github.com/rust-lang/crates.io-index"
3606checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4"
3607
3608[[package]]
2917name = "once_cell"3609name = "once_cell"
2918version = "1.4.0"3610version = "1.5.2"
2919source = "registry+https://github.com/rust-lang/crates.io-index"3611source = "registry+https://github.com/rust-lang/crates.io-index"
2920checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d"3612checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0"
2921dependencies = [3613dependencies = [
2922 "parking_lot 0.10.2",3614 "parking_lot 0.11.1",
2923]3615]
29243616
2925[[package]]3617[[package]]
29513643
2952[[package]]3644[[package]]
2953name = "pallet-aura"3645name = "pallet-aura"
2954version = "2.0.0-rc4"3646version = "2.0.1"
2955source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3647source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
2956dependencies = [3648dependencies = [
2957 "frame-support",3649 "frame-support",
2958 "frame-system",3650 "frame-system",
2969]3661]
29703662
2971[[package]]3663[[package]]
3664name = "pallet-authorship"
3665version = "2.0.1"
3666source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3667dependencies = [
3668 "frame-support",
3669 "frame-system",
3670 "impl-trait-for-tuples 0.2.1",
3671 "parity-scale-codec",
3672 "sp-authorship",
3673 "sp-inherents",
3674 "sp-runtime",
3675 "sp-std",
3676]
3677
3678[[package]]
2972name = "pallet-balances"3679name = "pallet-balances"
2973version = "2.0.0-rc4"3680version = "2.0.1"
2974source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3681source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
2975dependencies = [3682dependencies = [
2976 "frame-benchmarking",3683 "frame-benchmarking",
2977 "frame-support",3684 "frame-support",
29843691
2985[[package]]3692[[package]]
2986name = "pallet-contracts"3693name = "pallet-contracts"
2987version = "2.0.0-rc4"3694version = "2.0.1"
2988source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3695source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
2989dependencies = [3696dependencies = [
2990 "frame-support",3697 "frame-support",
2991 "frame-system",3698 "frame-system",
2992 "pallet-contracts-primitives",3699 "pallet-contracts-primitives",
3700 "pallet-contracts-proc-macro",
2993 "parity-scale-codec",3701 "parity-scale-codec",
2994 "parity-wasm",3702 "parity-wasm",
2995 "pwasm-utils",3703 "pwasm-utils 0.16.0",
2996 "serde",3704 "serde",
2997 "sp-core",3705 "sp-core",
2998 "sp-io",3706 "sp-io",
30043712
3005[[package]]3713[[package]]
3006name = "pallet-contracts-primitives"3714name = "pallet-contracts-primitives"
3007version = "2.0.0-rc4"3715version = "2.0.1"
3008source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3716source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3009dependencies = [3717dependencies = [
3718 "bitflags",
3010 "parity-scale-codec",3719 "parity-scale-codec",
3011 "sp-runtime",3720 "sp-runtime",
3012 "sp-std",3721 "sp-std",
3013]3722]
30143723
3015[[package]]3724[[package]]
3725name = "pallet-contracts-proc-macro"
3726version = "0.1.0"
3727source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3728dependencies = [
3729 "proc-macro2",
3730 "quote",
3731 "syn",
3732]
3733
3734[[package]]
3016name = "pallet-contracts-rpc"3735name = "pallet-contracts-rpc"
3017version = "0.8.0-rc4"3736version = "0.8.1"
3018source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3737source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3019dependencies = [3738dependencies = [
3020 "jsonrpc-core",3739 "jsonrpc-core",
3021 "jsonrpc-core-client",3740 "jsonrpc-core-client",
30333752
3034[[package]]3753[[package]]
3035name = "pallet-contracts-rpc-runtime-api"3754name = "pallet-contracts-rpc-runtime-api"
3036version = "0.8.0-rc4"3755version = "0.8.1"
3037source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3756source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3038dependencies = [3757dependencies = [
3039 "pallet-contracts-primitives",3758 "pallet-contracts-primitives",
3040 "parity-scale-codec",3759 "parity-scale-codec",
3044]3763]
30453764
3046[[package]]3765[[package]]
3047name = "pallet-finality-tracker"
3048version = "2.0.0-rc4"
3049source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"
3050dependencies = [
3051 "frame-support",
3052 "frame-system",
3053 "impl-trait-for-tuples",
3054 "parity-scale-codec",
3055 "serde",
3056 "sp-finality-tracker",
3057 "sp-inherents",
3058 "sp-runtime",
3059 "sp-std",
3060]
3061
3062[[package]]
3063name = "pallet-grandpa"3766name = "pallet-grandpa"
3064version = "2.0.0-rc4"3767version = "2.0.1"
3065source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3768source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3066dependencies = [3769dependencies = [
3770 "frame-benchmarking",
3067 "frame-support",3771 "frame-support",
3068 "frame-system",3772 "frame-system",
3069 "pallet-finality-tracker",3773 "pallet-authorship",
3070 "pallet-session",3774 "pallet-session",
3071 "parity-scale-codec",3775 "parity-scale-codec",
3072 "serde",3776 "serde",
30813785
3082[[package]]3786[[package]]
3083name = "pallet-nft"3787name = "pallet-nft"
3084version = "2.0.0-rc4"3788version = "2.1.0"
3085dependencies = [3789dependencies = [
3790 "frame-benchmarking",
3086 "frame-support",3791 "frame-support",
3087 "frame-system",3792 "frame-system",
3088 "log",3793 "log",
3794 "pallet-balances",
3795 "pallet-contracts",
3796 "pallet-randomness-collective-flip",
3797 "pallet-timestamp",
3089 "pallet-transaction-payment",3798 "pallet-transaction-payment",
3090 "parity-scale-codec",3799 "parity-scale-codec",
3091 "serde",3800 "serde",
30973806
3098[[package]]3807[[package]]
3099name = "pallet-randomness-collective-flip"3808name = "pallet-randomness-collective-flip"
3100version = "2.0.0-rc4"3809version = "2.0.1"
3101source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3810source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3102dependencies = [3811dependencies = [
3103 "frame-support",3812 "frame-support",
3104 "frame-system",3813 "frame-system",
31103819
3111[[package]]3820[[package]]
3112name = "pallet-session"3821name = "pallet-session"
3113version = "2.0.0-rc4"3822version = "2.0.1"
3114source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3823source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3115dependencies = [3824dependencies = [
3116 "frame-support",3825 "frame-support",
3117 "frame-system",3826 "frame-system",
3118 "impl-trait-for-tuples",3827 "impl-trait-for-tuples 0.1.3",
3119 "pallet-timestamp",3828 "pallet-timestamp",
3120 "parity-scale-codec",3829 "parity-scale-codec",
3121 "serde",3830 "serde",
31303839
3131[[package]]3840[[package]]
3132name = "pallet-sudo"3841name = "pallet-sudo"
3133version = "2.0.0-rc4"3842version = "2.0.1"
3134source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3843source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3135dependencies = [3844dependencies = [
3136 "frame-support",3845 "frame-support",
3137 "frame-system",3846 "frame-system",
31443853
3145[[package]]3854[[package]]
3146name = "pallet-timestamp"3855name = "pallet-timestamp"
3147version = "2.0.0-rc4"3856version = "2.0.1"
3148source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3857source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3149dependencies = [3858dependencies = [
3150 "frame-benchmarking",3859 "frame-benchmarking",
3151 "frame-support",3860 "frame-support",
3152 "frame-system",3861 "frame-system",
3153 "impl-trait-for-tuples",3862 "impl-trait-for-tuples 0.2.1",
3154 "parity-scale-codec",3863 "parity-scale-codec",
3155 "serde",3864 "serde",
3156 "sp-inherents",3865 "sp-inherents",
3866 "sp-io",
3157 "sp-runtime",3867 "sp-runtime",
3158 "sp-std",3868 "sp-std",
3159 "sp-timestamp",3869 "sp-timestamp",
3160]3870]
31613871
3162[[package]]3872[[package]]
3163name = "pallet-transaction-payment"3873name = "pallet-transaction-payment"
3164version = "2.0.0-rc4"3874version = "2.0.1"
3165source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3875source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3166dependencies = [3876dependencies = [
3167 "frame-support",3877 "frame-support",
3168 "frame-system",3878 "frame-system",
3169 "pallet-transaction-payment-rpc-runtime-api",
3170 "parity-scale-codec",3879 "parity-scale-codec",
3171 "serde",3880 "serde",
3172 "smallvec 1.4.1",3881 "smallvec 1.6.1",
3882 "sp-core",
3883 "sp-io",
3173 "sp-runtime",3884 "sp-runtime",
3174 "sp-std",3885 "sp-std",
3175]3886]
31763887
3177[[package]]3888[[package]]
3889name = "pallet-transaction-payment-rpc"
3890version = "2.0.1"
3891source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3892dependencies = [
3893 "jsonrpc-core",
3894 "jsonrpc-core-client",
3895 "jsonrpc-derive",
3896 "pallet-transaction-payment-rpc-runtime-api",
3897 "parity-scale-codec",
3898 "sp-api",
3899 "sp-blockchain",
3900 "sp-core",
3901 "sp-rpc",
3902 "sp-runtime",
3903]
3904
3905[[package]]
3178name = "pallet-transaction-payment-rpc-runtime-api"3906name = "pallet-transaction-payment-rpc-runtime-api"
3179version = "2.0.0-rc4"3907version = "2.0.1"
3180source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3908source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3181dependencies = [3909dependencies = [
3910 "pallet-transaction-payment",
3911 "parity-scale-codec",
3912 "sp-api",
3913 "sp-runtime",
3914]
3915
3916[[package]]
3917name = "pallet-treasury"
3918version = "2.0.1"
3919source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3920dependencies = [
3182 "frame-support",3921 "frame-support",
3922 "frame-system",
3923 "impl-trait-for-tuples 0.2.1",
3924 "pallet-balances",
3183 "parity-scale-codec",3925 "parity-scale-codec",
3184 "serde",3926 "serde",
3185 "sp-api",
3186 "sp-runtime",3927 "sp-runtime",
3187 "sp-std",3928 "sp-std",
3188]3929]
31893930
3190[[package]]3931[[package]]
3932name = "pallet-vesting"
3933version = "2.0.1"
3934source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
3935dependencies = [
3936 "enumflags2",
3937 "frame-support",
3938 "frame-system",
3939 "parity-scale-codec",
3940 "serde",
3941 "sp-runtime",
3942 "sp-std",
3943]
3944
3945[[package]]
3191name = "parity-db"3946name = "parity-db"
3192version = "0.1.2"3947version = "0.1.2"
3193source = "registry+https://github.com/rust-lang/crates.io-index"3948source = "registry+https://github.com/rust-lang/crates.io-index"
32033958
3204[[package]]3959[[package]]
3205name = "parity-multiaddr"3960name = "parity-multiaddr"
3206version = "0.7.3"3961version = "0.11.1"
3207source = "registry+https://github.com/rust-lang/crates.io-index"3962source = "registry+https://github.com/rust-lang/crates.io-index"
3208checksum = "f77055f9e81921a8cc7bebeb6cded3d128931d51f1e3dd6251f0770a6d431477"3963checksum = "d2c6805f98667a3828afb2ec2c396a8d610497e8d546f5447188aae47c5a79ec"
3209dependencies = [3964dependencies = [
3210 "arrayref",3965 "arrayref",
3211 "bs58",3966 "bs58",
3212 "byteorder",3967 "byteorder",
3213 "data-encoding",3968 "data-encoding",
3214 "parity-multihash",
3215 "percent-encoding 2.1.0",
3216 "serde",
3217 "static_assertions",
3218 "unsigned-varint 0.3.3",
3219 "url 2.1.1",
3220]
3221
3222[[package]]
3223name = "parity-multiaddr"
3224version = "0.9.1"
3225source = "registry+https://github.com/rust-lang/crates.io-index"
3226checksum = "cc20af3143a62c16e7c9e92ea5c6ae49f7d271d97d4d8fe73afc28f0514a3d0f"
3227dependencies = [
3228 "arrayref",
3229 "bs58",
3230 "byteorder",
3231 "data-encoding",
3232 "multihash",3969 "multihash",
3233 "percent-encoding 2.1.0",3970 "percent-encoding 2.1.0",
3234 "serde",3971 "serde",
3235 "static_assertions",3972 "static_assertions",
3236 "unsigned-varint 0.4.0",3973 "unsigned-varint 0.7.0",
3237 "url 2.1.1",3974 "url 2.2.0",
3238]3975]
32393976
3240[[package]]3977[[package]]
3241name = "parity-multihash"
3242version = "0.2.3"
3243source = "registry+https://github.com/rust-lang/crates.io-index"
3244checksum = "7a1cd2ba02391b81367bec529fb209019d718684fdc8ad6a712c2b536e46f775"
3245dependencies = [
3246 "blake2 0.8.1",
3247 "bytes 0.5.6",
3248 "rand 0.7.3",
3249 "sha-1",
3250 "sha2 0.8.2",
3251 "sha3",
3252 "unsigned-varint 0.3.3",
3253]
3254
3255[[package]]
3256name = "parity-scale-codec"3978name = "parity-scale-codec"
3257version = "1.3.1"3979version = "1.3.6"
3258source = "registry+https://github.com/rust-lang/crates.io-index"3980source = "registry+https://github.com/rust-lang/crates.io-index"
3259checksum = "a74f02beb35d47e0706155c9eac554b50c671e0d868fe8296bcdf44a9a4847bf"3981checksum = "79602888a81ace83e3d1d4b2873286c1f5f906c84db667594e8db8da3506c383"
3260dependencies = [3982dependencies = [
3261 "arrayvec 0.5.1",3983 "arrayvec 0.5.2",
3262 "bitvec",3984 "bitvec",
3263 "byte-slice-cast",3985 "byte-slice-cast",
3264 "parity-scale-codec-derive",3986 "parity-scale-codec-derive",
32673989
3268[[package]]3990[[package]]
3269name = "parity-scale-codec-derive"3991name = "parity-scale-codec-derive"
3270version = "1.2.0"3992version = "1.2.2"
3271source = "registry+https://github.com/rust-lang/crates.io-index"3993source = "registry+https://github.com/rust-lang/crates.io-index"
3272checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245"3994checksum = "198db82bb1c18fc00176004462dd809b2a6d851669550aa17af6dacd21ae0c14"
3273dependencies = [3995dependencies = [
3274 "proc-macro-crate",3996 "proc-macro-crate",
3275 "proc-macro2",3997 "proc-macro2",
3276 "quote 1.0.7",3998 "quote",
3277 "syn 1.0.34",3999 "syn",
3278]4000]
32794001
3280[[package]]4002[[package]]
3290checksum = "1e57fea504fea33f9fbb5f49f378359030e7e026a6ab849bb9e8f0787376f1bf"4012checksum = "1e57fea504fea33f9fbb5f49f378359030e7e026a6ab849bb9e8f0787376f1bf"
3291dependencies = [4013dependencies = [
3292 "bytes 0.4.12",4014 "bytes 0.4.12",
3293 "futures 0.1.29",4015 "futures 0.1.30",
3294 "libc",4016 "libc",
3295 "log",4017 "log",
3296 "mio-named-pipes",4018 "mio-named-pipes",
3297 "miow 0.3.5",4019 "miow 0.3.6",
3298 "rand 0.7.3",4020 "rand 0.7.3",
3299 "tokio 0.1.22",4021 "tokio 0.1.22",
3300 "tokio-named-pipes",4022 "tokio-named-pipes",
33044026
3305[[package]]4027[[package]]
3306name = "parity-util-mem"4028name = "parity-util-mem"
3307version = "0.6.1"4029version = "0.8.0"
3308source = "registry+https://github.com/rust-lang/crates.io-index"4030source = "registry+https://github.com/rust-lang/crates.io-index"
3309checksum = "2c6e2583649a3ca84894d1d71da249abcfda54d5aca24733d72ca10d0f02361c"4031checksum = "8f17f15cb05897127bf36a240085a1f0bbef7bce3024849eccf7f93f6171bc27"
3310dependencies = [4032dependencies = [
3311 "cfg-if",4033 "cfg-if 1.0.0",
3312 "impl-trait-for-tuples",4034 "hashbrown",
4035 "impl-trait-for-tuples 0.2.1",
3313 "parity-util-mem-derive",4036 "parity-util-mem-derive",
3314 "parking_lot 0.10.2",4037 "parking_lot 0.11.1",
3315 "primitive-types",4038 "primitive-types",
3316 "smallvec 1.4.1",4039 "smallvec 1.6.1",
3317 "winapi 0.3.9",4040 "winapi 0.3.9",
3318]4041]
33194042
3324checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2"4047checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2"
3325dependencies = [4048dependencies = [
3326 "proc-macro2",4049 "proc-macro2",
3327 "syn 1.0.34",4050 "syn",
3328 "synstructure",4051 "synstructure",
3329]4052]
33304053
3335checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865"4058checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865"
33364059
3337[[package]]4060[[package]]
4061name = "parity-ws"
4062version = "0.10.0"
4063source = "registry+https://github.com/rust-lang/crates.io-index"
4064checksum = "9e02a625dd75084c2a7024f07c575b61b782f729d18702dabb3cdbf31911dc61"
4065dependencies = [
4066 "byteorder",
4067 "bytes 0.4.12",
4068 "httparse",
4069 "log",
4070 "mio",
4071 "mio-extras",
4072 "rand 0.7.3",
4073 "sha-1 0.8.2",
4074 "slab",
4075 "url 2.2.0",
4076]
4077
4078[[package]]
4079name = "parking"
4080version = "2.0.0"
4081source = "registry+https://github.com/rust-lang/crates.io-index"
4082checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72"
4083
4084[[package]]
3338name = "parking_lot"4085name = "parking_lot"
3339version = "0.9.0"4086version = "0.9.0"
3340source = "registry+https://github.com/rust-lang/crates.io-index"4087source = "registry+https://github.com/rust-lang/crates.io-index"
3341checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"4088checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
3342dependencies = [4089dependencies = [
3343 "lock_api",4090 "lock_api 0.3.4",
3344 "parking_lot_core 0.6.2",4091 "parking_lot_core 0.6.2",
3345 "rustc_version",4092 "rustc_version",
3346]4093]
3351source = "registry+https://github.com/rust-lang/crates.io-index"4098source = "registry+https://github.com/rust-lang/crates.io-index"
3352checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"4099checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"
3353dependencies = [4100dependencies = [
3354 "lock_api",4101 "lock_api 0.3.4",
3355 "parking_lot_core 0.7.2",4102 "parking_lot_core 0.7.2",
3356]4103]
33574104
3358[[package]]4105[[package]]
4106name = "parking_lot"
4107version = "0.11.1"
4108source = "registry+https://github.com/rust-lang/crates.io-index"
4109checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
4110dependencies = [
4111 "instant",
4112 "lock_api 0.4.2",
4113 "parking_lot_core 0.8.3",
4114]
4115
4116[[package]]
3359name = "parking_lot_core"4117name = "parking_lot_core"
3360version = "0.6.2"4118version = "0.6.2"
3361source = "registry+https://github.com/rust-lang/crates.io-index"4119source = "registry+https://github.com/rust-lang/crates.io-index"
3362checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"4120checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
3363dependencies = [4121dependencies = [
3364 "cfg-if",4122 "cfg-if 0.1.10",
3365 "cloudabi",4123 "cloudabi",
3366 "libc",4124 "libc",
3367 "redox_syscall",4125 "redox_syscall 0.1.57",
3368 "rustc_version",4126 "rustc_version",
3369 "smallvec 0.6.13",4127 "smallvec 0.6.14",
3370 "winapi 0.3.9",4128 "winapi 0.3.9",
3371]4129]
33724130
3376source = "registry+https://github.com/rust-lang/crates.io-index"4134source = "registry+https://github.com/rust-lang/crates.io-index"
3377checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"4135checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
3378dependencies = [4136dependencies = [
3379 "cfg-if",4137 "cfg-if 0.1.10",
3380 "cloudabi",4138 "cloudabi",
3381 "libc",4139 "libc",
3382 "redox_syscall",4140 "redox_syscall 0.1.57",
3383 "smallvec 1.4.1",4141 "smallvec 1.6.1",
3384 "winapi 0.3.9",4142 "winapi 0.3.9",
3385]4143]
33864144
3387[[package]]4145[[package]]
4146name = "parking_lot_core"
4147version = "0.8.3"
4148source = "registry+https://github.com/rust-lang/crates.io-index"
4149checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018"
4150dependencies = [
4151 "cfg-if 1.0.0",
4152 "instant",
4153 "libc",
4154 "redox_syscall 0.2.5",
4155 "smallvec 1.6.1",
4156 "winapi 0.3.9",
4157]
4158
4159[[package]]
3388name = "paste"4160name = "paste"
3389version = "0.1.18"4161version = "0.1.18"
3390source = "registry+https://github.com/rust-lang/crates.io-index"4162source = "registry+https://github.com/rust-lang/crates.io-index"
3414]4186]
34154187
3416[[package]]4188[[package]]
4189name = "pbkdf2"
4190version = "0.4.0"
4191source = "registry+https://github.com/rust-lang/crates.io-index"
4192checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd"
4193dependencies = [
4194 "crypto-mac 0.8.0",
4195]
4196
4197[[package]]
4198name = "pdqselect"
4199version = "0.1.0"
4200source = "registry+https://github.com/rust-lang/crates.io-index"
4201checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27"
4202
4203[[package]]
3417name = "peeking_take_while"4204name = "peeking_take_while"
3418version = "0.1.2"4205version = "0.1.2"
3419source = "registry+https://github.com/rust-lang/crates.io-index"4206source = "registry+https://github.com/rust-lang/crates.io-index"
3432checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"4219checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
34334220
3434[[package]]4221[[package]]
4222name = "pest"
4223version = "2.1.3"
4224source = "registry+https://github.com/rust-lang/crates.io-index"
4225checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53"
4226dependencies = [
4227 "ucd-trie",
4228]
4229
4230[[package]]
4231name = "pest_derive"
4232version = "2.1.0"
4233source = "registry+https://github.com/rust-lang/crates.io-index"
4234checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0"
4235dependencies = [
4236 "pest",
4237 "pest_generator",
4238]
4239
4240[[package]]
4241name = "pest_generator"
4242version = "2.1.3"
4243source = "registry+https://github.com/rust-lang/crates.io-index"
4244checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55"
4245dependencies = [
4246 "pest",
4247 "pest_meta",
4248 "proc-macro2",
4249 "quote",
4250 "syn",
4251]
4252
4253[[package]]
4254name = "pest_meta"
4255version = "2.1.3"
4256source = "registry+https://github.com/rust-lang/crates.io-index"
4257checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d"
4258dependencies = [
4259 "maplit",
4260 "pest",
4261 "sha-1 0.8.2",
4262]
4263
4264[[package]]
3435name = "petgraph"4265name = "petgraph"
3436version = "0.5.1"4266version = "0.5.1"
3437source = "registry+https://github.com/rust-lang/crates.io-index"4267source = "registry+https://github.com/rust-lang/crates.io-index"
34434273
3444[[package]]4274[[package]]
3445name = "pin-project"4275name = "pin-project"
3446version = "0.4.22"4276version = "0.4.27"
3447source = "registry+https://github.com/rust-lang/crates.io-index"4277source = "registry+https://github.com/rust-lang/crates.io-index"
3448checksum = "12e3a6cdbfe94a5e4572812a0201f8c0ed98c1c452c7b8563ce2276988ef9c17"4278checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15"
3449dependencies = [4279dependencies = [
3450 "pin-project-internal",4280 "pin-project-internal 0.4.27",
3451]4281]
34524282
3453[[package]]4283[[package]]
4284name = "pin-project"
4285version = "1.0.5"
4286source = "registry+https://github.com/rust-lang/crates.io-index"
4287checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63"
4288dependencies = [
4289 "pin-project-internal 1.0.5",
4290]
4291
4292[[package]]
3454name = "pin-project-internal"4293name = "pin-project-internal"
3455version = "0.4.22"4294version = "0.4.27"
3456source = "registry+https://github.com/rust-lang/crates.io-index"4295source = "registry+https://github.com/rust-lang/crates.io-index"
3457checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7"4296checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895"
3458dependencies = [4297dependencies = [
3459 "proc-macro2",4298 "proc-macro2",
3460 "quote 1.0.7",4299 "quote",
3461 "syn 1.0.34",4300 "syn",
3462]4301]
34634302
3464[[package]]4303[[package]]
4304name = "pin-project-internal"
4305version = "1.0.5"
4306source = "registry+https://github.com/rust-lang/crates.io-index"
4307checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b"
4308dependencies = [
4309 "proc-macro2",
4310 "quote",
4311 "syn",
4312]
4313
4314[[package]]
3465name = "pin-project-lite"4315name = "pin-project-lite"
3466version = "0.1.7"4316version = "0.1.11"
3467source = "registry+https://github.com/rust-lang/crates.io-index"4317source = "registry+https://github.com/rust-lang/crates.io-index"
3468checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715"4318checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b"
34694319
3470[[package]]4320[[package]]
4321name = "pin-project-lite"
4322version = "0.2.4"
4323source = "registry+https://github.com/rust-lang/crates.io-index"
4324checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827"
4325
4326[[package]]
3471name = "pin-utils"4327name = "pin-utils"
3472version = "0.1.0"4328version = "0.1.0"
3473source = "registry+https://github.com/rust-lang/crates.io-index"4329source = "registry+https://github.com/rust-lang/crates.io-index"
3474checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"4330checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
34754331
3476[[package]]4332[[package]]
3477name = "pkg-config"4333name = "pkg-config"
3478version = "0.3.18"4334version = "0.3.19"
3479source = "registry+https://github.com/rust-lang/crates.io-index"4335source = "registry+https://github.com/rust-lang/crates.io-index"
3480checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33"4336checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
34814337
3482[[package]]4338[[package]]
3483name = "platforms"4339name = "platforms"
3486checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e"4342checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e"
34874343
3488[[package]]4344[[package]]
4345name = "polling"
4346version = "2.0.2"
4347source = "registry+https://github.com/rust-lang/crates.io-index"
4348checksum = "a2a7bc6b2a29e632e45451c941832803a18cce6781db04de8a04696cdca8bde4"
4349dependencies = [
4350 "cfg-if 0.1.10",
4351 "libc",
4352 "log",
4353 "wepoll-sys",
4354 "winapi 0.3.9",
4355]
4356
4357[[package]]
3489name = "poly1305"4358name = "poly1305"
3490version = "0.6.0"4359version = "0.6.2"
3491source = "registry+https://github.com/rust-lang/crates.io-index"4360source = "registry+https://github.com/rust-lang/crates.io-index"
3492checksum = "d9b42192ab143ed7619bf888a7f9c6733a9a2153b218e2cd557cfdb52fbf9bb1"4361checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8"
3493dependencies = [4362dependencies = [
4363 "cpuid-bool 0.2.0",
3494 "universal-hash",4364 "universal-hash",
3495]4365]
34964366
3497[[package]]4367[[package]]
3498name = "polyval"4368name = "polyval"
3499version = "0.4.0"4369version = "0.4.5"
3500source = "registry+https://github.com/rust-lang/crates.io-index"4370source = "registry+https://github.com/rust-lang/crates.io-index"
3501checksum = "d9a50142b55ab3ed0e9f68dfb3709f1d90d29da24e91033f28b96330643107dc"4371checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd"
3502dependencies = [4372dependencies = [
3503 "cfg-if",4373 "cpuid-bool 0.2.0",
4374 "opaque-debug 0.3.0",
3504 "universal-hash",4375 "universal-hash",
3505]4376]
35064377
3507[[package]]4378[[package]]
3508name = "ppv-lite86"4379name = "ppv-lite86"
3509version = "0.2.8"4380version = "0.2.10"
3510source = "registry+https://github.com/rust-lang/crates.io-index"4381source = "registry+https://github.com/rust-lang/crates.io-index"
3511checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea"4382checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
35124383
3513[[package]]4384[[package]]
3514name = "primitive-types"4385name = "primitive-types"
3515version = "0.7.2"4386version = "0.8.0"
3516source = "registry+https://github.com/rust-lang/crates.io-index"4387source = "registry+https://github.com/rust-lang/crates.io-index"
3517checksum = "c55c21c64d0eaa4d7ed885d959ef2d62d9e488c27c0e02d9aa5ce6c877b7d5f8"4388checksum = "b3824ae2c5e27160113b9e029a10ec9e3f0237bad8029f69c7724393c9fdefd8"
3518dependencies = [4389dependencies = [
3519 "fixed-hash",4390 "fixed-hash",
3520 "impl-codec",4391 "impl-codec",
3521 "impl-serde 0.3.1",4392 "impl-serde",
3522 "uint",4393 "uint",
3523]4394]
35244395
35334404
3534[[package]]4405[[package]]
3535name = "proc-macro-error"4406name = "proc-macro-error"
3536version = "1.0.3"4407version = "1.0.4"
3537source = "registry+https://github.com/rust-lang/crates.io-index"4408source = "registry+https://github.com/rust-lang/crates.io-index"
3538checksum = "fc175e9777c3116627248584e8f8b3e2987405cabe1c0adf7d1dd28f09dc7880"4409checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
3539dependencies = [4410dependencies = [
3540 "proc-macro-error-attr",4411 "proc-macro-error-attr",
3541 "proc-macro2",4412 "proc-macro2",
3542 "quote 1.0.7",4413 "quote",
3543 "syn 1.0.34",4414 "syn",
3544 "version_check",4415 "version_check",
3545]4416]
35464417
3547[[package]]4418[[package]]
3548name = "proc-macro-error-attr"4419name = "proc-macro-error-attr"
3549version = "1.0.3"4420version = "1.0.4"
3550source = "registry+https://github.com/rust-lang/crates.io-index"4421source = "registry+https://github.com/rust-lang/crates.io-index"
3551checksum = "3cc9795ca17eb581285ec44936da7fc2335a3f34f2ddd13118b6f4d515435c50"4422checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
3552dependencies = [4423dependencies = [
3553 "proc-macro2",4424 "proc-macro2",
3554 "quote 1.0.7",4425 "quote",
3555 "syn 1.0.34",
3556 "syn-mid",
3557 "version_check",4426 "version_check",
3558]4427]
35594428
3560[[package]]4429[[package]]
3561name = "proc-macro-hack"4430name = "proc-macro-hack"
3562version = "0.5.16"4431version = "0.5.19"
3563source = "registry+https://github.com/rust-lang/crates.io-index"4432source = "registry+https://github.com/rust-lang/crates.io-index"
3564checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4"4433checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
35654434
3566[[package]]4435[[package]]
3567name = "proc-macro-nested"4436name = "proc-macro-nested"
3568version = "0.1.6"4437version = "0.1.7"
3569source = "registry+https://github.com/rust-lang/crates.io-index"4438source = "registry+https://github.com/rust-lang/crates.io-index"
3570checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a"4439checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
35714440
3572[[package]]4441[[package]]
3573name = "proc-macro2"4442name = "proc-macro2"
3574version = "1.0.19"4443version = "1.0.24"
3575source = "registry+https://github.com/rust-lang/crates.io-index"4444source = "registry+https://github.com/rust-lang/crates.io-index"
3576checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12"4445checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
3577dependencies = [4446dependencies = [
3578 "unicode-xid 0.2.1",4447 "unicode-xid",
3579]4448]
35804449
3581[[package]]4450[[package]]
3582name = "procfs"
3583version = "0.7.9"
3584source = "registry+https://github.com/rust-lang/crates.io-index"
3585checksum = "c434e93ef69c216e68e4f417c927b4f31502c3560b72cfdb6827e2321c5c6b3e"
3586dependencies = [
3587 "bitflags",
3588 "byteorder",
3589 "chrono",
3590 "hex",
3591 "lazy_static",
3592 "libc",
3593 "libflate",
3594]
3595
3596[[package]]
3597name = "prometheus"4451name = "prometheus"
3598version = "0.8.0"4452version = "0.10.0"
3599source = "registry+https://github.com/rust-lang/crates.io-index"4453source = "registry+https://github.com/rust-lang/crates.io-index"
3600checksum = "b0575e258dab62268e7236d7307caa38848acbda7ec7ab87bd9093791e999d20"4454checksum = "30d70cf4412832bcac9cffe27906f4a66e450d323525e977168c70d1b36120ae"
3601dependencies = [4455dependencies = [
3602 "cfg-if",4456 "cfg-if 0.1.10",
3603 "fnv",4457 "fnv",
3604 "lazy_static",4458 "lazy_static",
3605 "protobuf",4459 "parking_lot 0.11.1",
3606 "spin",4460 "regex",
3607 "thiserror",4461 "thiserror",
3608]4462]
36094463
3610[[package]]4464[[package]]
3611name = "prost"4465name = "prost"
3612version = "0.6.1"4466version = "0.7.0"
3613source = "registry+https://github.com/rust-lang/crates.io-index"4467source = "registry+https://github.com/rust-lang/crates.io-index"
3614checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212"4468checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2"
3615dependencies = [4469dependencies = [
3616 "bytes 0.5.6",4470 "bytes 1.0.1",
3617 "prost-derive",4471 "prost-derive",
3618]4472]
36194473
3620[[package]]4474[[package]]
3621name = "prost-build"4475name = "prost-build"
3622version = "0.6.1"4476version = "0.7.0"
3623source = "registry+https://github.com/rust-lang/crates.io-index"4477source = "registry+https://github.com/rust-lang/crates.io-index"
3624checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26"4478checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3"
3625dependencies = [4479dependencies = [
3626 "bytes 0.5.6",4480 "bytes 1.0.1",
3627 "heck",4481 "heck",
3628 "itertools 0.8.2",4482 "itertools",
3629 "log",4483 "log",
3630 "multimap",4484 "multimap",
3631 "petgraph",4485 "petgraph",
3632 "prost",4486 "prost",
3633 "prost-types",4487 "prost-types",
3634 "tempfile",4488 "tempfile",
3635 "which",4489 "which 4.0.2",
3636]4490]
36374491
3638[[package]]4492[[package]]
3639name = "prost-derive"4493name = "prost-derive"
3640version = "0.6.1"4494version = "0.7.0"
3641source = "registry+https://github.com/rust-lang/crates.io-index"4495source = "registry+https://github.com/rust-lang/crates.io-index"
3642checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72"4496checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4"
3643dependencies = [4497dependencies = [
3644 "anyhow",4498 "anyhow",
3645 "itertools 0.8.2",4499 "itertools",
3646 "proc-macro2",4500 "proc-macro2",
3647 "quote 1.0.7",4501 "quote",
3648 "syn 1.0.34",4502 "syn",
3649]4503]
36504504
3651[[package]]4505[[package]]
3652name = "prost-types"4506name = "prost-types"
3653version = "0.6.1"4507version = "0.7.0"
3654source = "registry+https://github.com/rust-lang/crates.io-index"4508source = "registry+https://github.com/rust-lang/crates.io-index"
3655checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa"4509checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb"
3656dependencies = [4510dependencies = [
3657 "bytes 0.5.6",4511 "bytes 1.0.1",
3658 "prost",4512 "prost",
3659]4513]
36604514
3661[[package]]4515[[package]]
3662name = "protobuf"4516name = "pwasm-utils"
3663version = "2.16.2"4517version = "0.14.0"
3664source = "registry+https://github.com/rust-lang/crates.io-index"4518source = "registry+https://github.com/rust-lang/crates.io-index"
3665checksum = "d883f78645c21b7281d21305181aa1f4dd9e9363e7cf2566c93121552cff003e"4519checksum = "0f53bc2558e8376358ebdc28301546471d67336584f6438ed4b7c7457a055fd7"
4520dependencies = [
4521 "byteorder",
4522 "log",
4523 "parity-wasm",
4524]
36664525
3667[[package]]4526[[package]]
3668name = "pwasm-utils"4527name = "pwasm-utils"
3669version = "0.12.0"4528version = "0.16.0"
3670source = "registry+https://github.com/rust-lang/crates.io-index"4529source = "registry+https://github.com/rust-lang/crates.io-index"
3671checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192"4530checksum = "1c8ac87af529432d3a4f0e2b3bbf08af49f28f09cc73ed7e551161bdaef5f78d"
3672dependencies = [4531dependencies = [
3673 "byteorder",4532 "byteorder",
3674 "log",4533 "log",
3682checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"4541checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
36834542
3684[[package]]4543[[package]]
4544name = "quick-error"
4545version = "2.0.0"
4546source = "registry+https://github.com/rust-lang/crates.io-index"
4547checksum = "3ac73b1112776fc109b2e61909bc46c7e1bf0d7f690ffb1676553acce16d5cda"
4548
4549[[package]]
3685name = "quicksink"4550name = "quicksink"
3686version = "0.1.2"4551version = "0.1.2"
3687source = "registry+https://github.com/rust-lang/crates.io-index"4552source = "registry+https://github.com/rust-lang/crates.io-index"
3688checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858"4553checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858"
3689dependencies = [4554dependencies = [
3690 "futures-core",4555 "futures-core",
3691 "futures-sink",4556 "futures-sink",
3692 "pin-project-lite",4557 "pin-project-lite 0.1.11",
3693]4558]
36944559
3695[[package]]4560[[package]]
3696name = "quote"4561name = "quote"
3697version = "0.3.15"4562version = "1.0.9"
3698source = "registry+https://github.com/rust-lang/crates.io-index"4563source = "registry+https://github.com/rust-lang/crates.io-index"
3699checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"4564checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
3700
3701[[package]]
3702name = "quote"
3703version = "1.0.7"
3704source = "registry+https://github.com/rust-lang/crates.io-index"
3705checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
3706dependencies = [4565dependencies = [
3707 "proc-macro2",4566 "proc-macro2",
3708]4567]
37384597
3739[[package]]4598[[package]]
3740name = "rand"4599name = "rand"
3741version = "0.5.6"
3742source = "registry+https://github.com/rust-lang/crates.io-index"
3743checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"
3744dependencies = [
3745 "cloudabi",
3746 "fuchsia-cprng",
3747 "libc",
3748 "rand_core 0.3.1",
3749 "winapi 0.3.9",
3750]
3751
3752[[package]]
3753name = "rand"
3754version = "0.6.5"
3755source = "registry+https://github.com/rust-lang/crates.io-index"
3756checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca"
3757dependencies = [
3758 "autocfg 0.1.7",
3759 "libc",
3760 "rand_chacha 0.1.1",
3761 "rand_core 0.4.2",
3762 "rand_hc 0.1.0",
3763 "rand_isaac",
3764 "rand_jitter",
3765 "rand_os",
3766 "rand_pcg 0.1.2",
3767 "rand_xorshift",
3768 "winapi 0.3.9",
3769]
3770
3771[[package]]
3772name = "rand"
3773version = "0.7.3"4600version = "0.7.3"
3774source = "registry+https://github.com/rust-lang/crates.io-index"4601source = "registry+https://github.com/rust-lang/crates.io-index"
3775checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"4602checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
3776dependencies = [4603dependencies = [
3777 "getrandom",4604 "getrandom 0.1.16",
3778 "libc",4605 "libc",
3779 "rand_chacha 0.2.2",4606 "rand_chacha 0.2.2",
3780 "rand_core 0.5.1",4607 "rand_core 0.5.1",
3781 "rand_hc 0.2.0",4608 "rand_hc 0.2.0",
3782 "rand_pcg 0.2.1",4609 "rand_pcg",
3783]4610]
37844611
3785[[package]]4612[[package]]
3786name = "rand_chacha"4613name = "rand"
3787version = "0.1.1"4614version = "0.8.3"
3788source = "registry+https://github.com/rust-lang/crates.io-index"4615source = "registry+https://github.com/rust-lang/crates.io-index"
3789checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef"4616checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
3790dependencies = [4617dependencies = [
3791 "autocfg 0.1.7",4618 "libc",
4619 "rand_chacha 0.3.0",
3792 "rand_core 0.3.1",4620 "rand_core 0.6.2",
4621 "rand_hc 0.3.0",
3793]4622]
37944623
3795[[package]]4624[[package]]
3803]4632]
38044633
3805[[package]]4634[[package]]
4635name = "rand_chacha"
4636version = "0.3.0"
4637source = "registry+https://github.com/rust-lang/crates.io-index"
4638checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
4639dependencies = [
4640 "ppv-lite86",
4641 "rand_core 0.6.2",
4642]
4643
4644[[package]]
3806name = "rand_core"4645name = "rand_core"
3807version = "0.3.1"4646version = "0.3.1"
3808source = "registry+https://github.com/rust-lang/crates.io-index"4647source = "registry+https://github.com/rust-lang/crates.io-index"
3823source = "registry+https://github.com/rust-lang/crates.io-index"4662source = "registry+https://github.com/rust-lang/crates.io-index"
3824checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"4663checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
3825dependencies = [4664dependencies = [
3826 "getrandom",4665 "getrandom 0.1.16",
3827]4666]
38284667
3829[[package]]4668[[package]]
3830name = "rand_hc"4669name = "rand_core"
3831version = "0.1.0"4670version = "0.6.2"
3832source = "registry+https://github.com/rust-lang/crates.io-index"4671source = "registry+https://github.com/rust-lang/crates.io-index"
3833checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4"4672checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
3834dependencies = [4673dependencies = [
3835 "rand_core 0.3.1",4674 "getrandom 0.2.2",
3836]4675]
38374676
3838[[package]]4677[[package]]
3839name = "rand_hc"4678name = "rand_distr"
3840version = "0.2.0"4679version = "0.2.2"
3841source = "registry+https://github.com/rust-lang/crates.io-index"4680source = "registry+https://github.com/rust-lang/crates.io-index"
3842checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"4681checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2"
3843dependencies = [4682dependencies = [
3844 "rand_core 0.5.1",4683 "rand 0.7.3",
3845]4684]
38464685
3847[[package]]4686[[package]]
3848name = "rand_isaac"4687name = "rand_hc"
3849version = "0.1.1"4688version = "0.2.0"
3850source = "registry+https://github.com/rust-lang/crates.io-index"4689source = "registry+https://github.com/rust-lang/crates.io-index"
3851checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08"4690checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
3852dependencies = [4691dependencies = [
3853 "rand_core 0.3.1",4692 "rand_core 0.5.1",
3854]4693]
38554694
3856[[package]]4695[[package]]
3857name = "rand_jitter"4696name = "rand_hc"
3858version = "0.1.4"4697version = "0.3.0"
3859source = "registry+https://github.com/rust-lang/crates.io-index"4698source = "registry+https://github.com/rust-lang/crates.io-index"
3860checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b"4699checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
3861dependencies = [4700dependencies = [
3862 "libc",4701 "rand_core 0.6.2",
3863 "rand_core 0.4.2",
3864 "winapi 0.3.9",
3865]4702]
38664703
3867[[package]]4704[[package]]
3868name = "rand_os"
3869version = "0.1.3"
3870source = "registry+https://github.com/rust-lang/crates.io-index"
3871checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
3872dependencies = [
3873 "cloudabi",
3874 "fuchsia-cprng",
3875 "libc",
3876 "rand_core 0.4.2",
3877 "rdrand",
3878 "winapi 0.3.9",
3879]
3880
3881[[package]]
3882name = "rand_pcg"4705name = "rand_pcg"
3883version = "0.1.2"
3884source = "registry+https://github.com/rust-lang/crates.io-index"
3885checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44"
3886dependencies = [
3887 "autocfg 0.1.7",
3888 "rand_core 0.4.2",
3889]
3890
3891[[package]]
3892name = "rand_pcg"
3893version = "0.2.1"4706version = "0.2.1"
3894source = "registry+https://github.com/rust-lang/crates.io-index"4707source = "registry+https://github.com/rust-lang/crates.io-index"
3895checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"4708checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
3898]4711]
38994712
3900[[package]]4713[[package]]
3901name = "rand_xorshift"4714name = "raw-cpuid"
3902version = "0.1.1"4715version = "7.0.4"
3903source = "registry+https://github.com/rust-lang/crates.io-index"4716source = "registry+https://github.com/rust-lang/crates.io-index"
3904checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c"4717checksum = "beb71f708fe39b2c5e98076204c3cc094ee5a4c12c4cdb119a2b72dc34164f41"
3905dependencies = [4718dependencies = [
3906 "rand_core 0.3.1",4719 "bitflags",
4720 "cc",
4721 "rustc_version",
3907]4722]
39084723
3909[[package]]4724[[package]]
39144729
3915[[package]]4730[[package]]
3916name = "rayon"4731name = "rayon"
3917version = "1.3.1"4732version = "1.5.0"
3918source = "registry+https://github.com/rust-lang/crates.io-index"4733source = "registry+https://github.com/rust-lang/crates.io-index"
3919checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080"4734checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
3920dependencies = [4735dependencies = [
3921 "autocfg 1.0.0",4736 "autocfg",
3922 "crossbeam-deque",4737 "crossbeam-deque 0.8.0",
3923 "either",4738 "either",
3924 "rayon-core",4739 "rayon-core",
3925]4740]
39264741
3927[[package]]4742[[package]]
3928name = "rayon-core"4743name = "rayon-core"
3929version = "1.7.1"4744version = "1.9.0"
3930source = "registry+https://github.com/rust-lang/crates.io-index"4745source = "registry+https://github.com/rust-lang/crates.io-index"
3931checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280"4746checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
3932dependencies = [4747dependencies = [
3933 "crossbeam-deque",4748 "crossbeam-channel",
3934 "crossbeam-queue",4749 "crossbeam-deque 0.8.0",
3935 "crossbeam-utils",4750 "crossbeam-utils 0.8.1",
3936 "lazy_static",4751 "lazy_static",
3937 "num_cpus",4752 "num_cpus",
3938]4753]
3953checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"4768checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
39544769
3955[[package]]4770[[package]]
4771name = "redox_syscall"
4772version = "0.2.5"
4773source = "registry+https://github.com/rust-lang/crates.io-index"
4774checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9"
4775dependencies = [
4776 "bitflags",
4777]
4778
4779[[package]]
3956name = "redox_users"4780name = "redox_users"
3957version = "0.3.4"4781version = "0.3.5"
3958source = "registry+https://github.com/rust-lang/crates.io-index"4782source = "registry+https://github.com/rust-lang/crates.io-index"
3959checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431"4783checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
3960dependencies = [4784dependencies = [
3961 "getrandom",4785 "getrandom 0.1.16",
3962 "redox_syscall",4786 "redox_syscall 0.1.57",
3963 "rust-argon2",4787 "rust-argon2",
3964]4788]
39654789
3966[[package]]4790[[package]]
3967name = "ref-cast"4791name = "ref-cast"
3968version = "1.0.2"4792version = "1.0.6"
3969source = "registry+https://github.com/rust-lang/crates.io-index"4793source = "registry+https://github.com/rust-lang/crates.io-index"
3970checksum = "745c1787167ddae5569661d5ffb8b25ae5fedbf46717eaa92d652221cec72623"4794checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da"
3971dependencies = [4795dependencies = [
3972 "ref-cast-impl",4796 "ref-cast-impl",
3973]4797]
39744798
3975[[package]]4799[[package]]
3976name = "ref-cast-impl"4800name = "ref-cast-impl"
3977version = "1.0.2"4801version = "1.0.6"
3978source = "registry+https://github.com/rust-lang/crates.io-index"4802source = "registry+https://github.com/rust-lang/crates.io-index"
3979checksum = "7d21b475ab879ef0e315ad99067fa25778c3b0377f57f1b00207448dac1a3144"4803checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2"
3980dependencies = [4804dependencies = [
3981 "proc-macro2",4805 "proc-macro2",
3982 "quote 1.0.7",4806 "quote",
3983 "syn 1.0.34",4807 "syn",
3984]4808]
39854809
3986[[package]]4810[[package]]
4811name = "regalloc"
4812version = "0.0.27"
4813source = "registry+https://github.com/rust-lang/crates.io-index"
4814checksum = "b9ba8aaf5fe7cf307c6dbdaeed85478961d29e25e3bee5169e11b92fa9f027a8"
4815dependencies = [
4816 "log",
4817 "rustc-hash",
4818 "smallvec 1.6.1",
4819]
4820
4821[[package]]
3987name = "regex"4822name = "regex"
3988version = "1.3.9"4823version = "1.4.3"
3989source = "registry+https://github.com/rust-lang/crates.io-index"4824source = "registry+https://github.com/rust-lang/crates.io-index"
3990checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"4825checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a"
3991dependencies = [4826dependencies = [
3992 "aho-corasick",4827 "aho-corasick",
3993 "memchr",4828 "memchr",
3996]4831]
39974832
3998[[package]]4833[[package]]
4834name = "regex-automata"
4835version = "0.1.9"
4836source = "registry+https://github.com/rust-lang/crates.io-index"
4837checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
4838dependencies = [
4839 "byteorder",
4840 "regex-syntax",
4841]
4842
4843[[package]]
3999name = "regex-syntax"4844name = "regex-syntax"
4000version = "0.6.18"4845version = "0.6.22"
4001source = "registry+https://github.com/rust-lang/crates.io-index"4846source = "registry+https://github.com/rust-lang/crates.io-index"
4002checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"4847checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581"
40034848
4004[[package]]4849[[package]]
4005name = "remove_dir_all"4850name = "region"
4006version = "0.5.3"4851version = "2.2.0"
4007source = "registry+https://github.com/rust-lang/crates.io-index"4852source = "registry+https://github.com/rust-lang/crates.io-index"
4008checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"4853checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0"
4009dependencies = [4854dependencies = [
4855 "bitflags",
4856 "libc",
4857 "mach",
4010 "winapi 0.3.9",4858 "winapi 0.3.9",
4011]4859]
40124860
4013[[package]]4861[[package]]
4014name = "rental"4862name = "remove_dir_all"
4015version = "0.5.5"4863version = "0.5.3"
4016source = "registry+https://github.com/rust-lang/crates.io-index"4864source = "registry+https://github.com/rust-lang/crates.io-index"
4017checksum = "8545debe98b2b139fb04cad8618b530e9b07c152d99a5de83c860b877d67847f"4865checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
4018dependencies = [4866dependencies = [
4019 "rental-impl",4867 "winapi 0.3.9",
4020 "stable_deref_trait",
4021]4868]
40224869
4023[[package]]4870[[package]]
4024name = "rental-impl"4871name = "retain_mut"
4025version = "0.5.5"4872version = "0.1.2"
4026source = "registry+https://github.com/rust-lang/crates.io-index"4873source = "registry+https://github.com/rust-lang/crates.io-index"
4027checksum = "475e68978dc5b743f2f40d8e0a8fdc83f1c5e78cbf4b8fa5e74e73beebc340de"4874checksum = "53552c6c49e1e13f1a203ef0080ab3bbef0beb570a528993e83df057a9d9bba1"
4028dependencies = [
4029 "proc-macro2",
4030 "quote 1.0.7",
4031 "syn 1.0.34",
4032]
40334875
4034[[package]]4876[[package]]
4035name = "ring"4877name = "ring"
4036version = "0.16.15"4878version = "0.16.20"
4037source = "registry+https://github.com/rust-lang/crates.io-index"4879source = "registry+https://github.com/rust-lang/crates.io-index"
4038checksum = "952cd6b98c85bbc30efa1ba5783b8abf12fec8b3287ffa52605b9432313e34e4"4880checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
4039dependencies = [4881dependencies = [
4040 "cc",4882 "cc",
4041 "libc",4883 "libc",
4047]4889]
40484890
4049[[package]]4891[[package]]
4050name = "rle-decode-fast"
4051version = "1.0.1"
4052source = "registry+https://github.com/rust-lang/crates.io-index"
4053checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac"
4054
4055[[package]]
4056name = "rocksdb"4892name = "rocksdb"
4057version = "0.14.0"4893version = "0.15.0"
4058source = "registry+https://github.com/rust-lang/crates.io-index"4894source = "registry+https://github.com/rust-lang/crates.io-index"
4059checksum = "61aa17a99a2413cd71c1106691bf59dad7de0cd5099127f90e9d99c429c40d4a"4895checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6"
4060dependencies = [4896dependencies = [
4061 "libc",4897 "libc",
4062 "librocksdb-sys",4898 "librocksdb-sys",
4063]4899]
40644900
4065[[package]]4901[[package]]
4066name = "rpassword"4902name = "rpassword"
4067version = "4.0.5"4903version = "5.0.1"
4068source = "registry+https://github.com/rust-lang/crates.io-index"4904source = "registry+https://github.com/rust-lang/crates.io-index"
4069checksum = "99371657d3c8e4d816fb6221db98fa408242b0b53bac08f8676a41f8554fe99f"4905checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb"
4070dependencies = [4906dependencies = [
4071 "libc",4907 "libc",
4072 "winapi 0.3.9",4908 "winapi 0.3.9",
4073]4909]
40744910
4075[[package]]4911[[package]]
4076name = "rust-argon2"4912name = "rust-argon2"
4077version = "0.7.0"4913version = "0.8.3"
4078source = "registry+https://github.com/rust-lang/crates.io-index"4914source = "registry+https://github.com/rust-lang/crates.io-index"
4079checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017"4915checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
4080dependencies = [4916dependencies = [
4081 "base64",4917 "base64 0.13.0",
4082 "blake2b_simd",4918 "blake2b_simd",
4083 "constant_time_eq",4919 "constant_time_eq",
4084 "crossbeam-utils",4920 "crossbeam-utils 0.8.1",
4085]4921]
40864922
4087[[package]]4923[[package]]
4088name = "rustc-demangle"4924name = "rustc-demangle"
4089version = "0.1.16"4925version = "0.1.18"
4090source = "registry+https://github.com/rust-lang/crates.io-index"4926source = "registry+https://github.com/rust-lang/crates.io-index"
4091checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"4927checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232"
40924928
4093[[package]]4929[[package]]
4094name = "rustc-hash"4930name = "rustc-hash"
41134949
4114[[package]]4950[[package]]
4115name = "rustls"4951name = "rustls"
4116version = "0.17.0"4952version = "0.18.1"
4117source = "registry+https://github.com/rust-lang/crates.io-index"4953source = "registry+https://github.com/rust-lang/crates.io-index"
4118checksum = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1"4954checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81"
4119dependencies = [4955dependencies = [
4120 "base64",4956 "base64 0.12.3",
4121 "log",4957 "log",
4122 "ring",4958 "ring",
4123 "sct",4959 "sct",
4124 "webpki",4960 "webpki",
4125]4961]
41264962
4127[[package]]4963[[package]]
4964name = "rustls"
4965version = "0.19.0"
4966source = "registry+https://github.com/rust-lang/crates.io-index"
4967checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b"
4968dependencies = [
4969 "base64 0.13.0",
4970 "log",
4971 "ring",
4972 "sct",
4973 "webpki",
4974]
4975
4976[[package]]
4128name = "rustls-native-certs"4977name = "rustls-native-certs"
4129version = "0.3.0"4978version = "0.4.0"
4130source = "registry+https://github.com/rust-lang/crates.io-index"4979source = "registry+https://github.com/rust-lang/crates.io-index"
4131checksum = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5"4980checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8"
4132dependencies = [4981dependencies = [
4133 "openssl-probe",4982 "openssl-probe",
4134 "rustls",4983 "rustls 0.18.1",
4135 "schannel",4984 "schannel",
4136 "security-framework",4985 "security-framework",
4137]4986]
4142source = "registry+https://github.com/rust-lang/crates.io-index"4991source = "registry+https://github.com/rust-lang/crates.io-index"
4143checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"4992checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"
4144dependencies = [4993dependencies = [
4145 "futures 0.3.5",4994 "futures 0.3.12",
4146 "pin-project",4995 "pin-project 0.4.27",
4147 "static_assertions",4996 "static_assertions",
4148]4997]
41494998
4163]5012]
41645013
4165[[package]]5014[[package]]
5015name = "salsa20"
5016version = "0.7.2"
5017source = "registry+https://github.com/rust-lang/crates.io-index"
5018checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15"
5019dependencies = [
5020 "cipher",
5021]
5022
5023[[package]]
4166name = "sc-basic-authorship"5024name = "sc-basic-authorship"
4167version = "0.8.0-rc4"5025version = "0.8.1"
4168source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5026source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4169dependencies = [5027dependencies = [
4170 "futures 0.3.5",5028 "futures 0.3.12",
4171 "futures-timer 3.0.2",5029 "futures-timer 3.0.2",
4172 "log",5030 "log",
4173 "parity-scale-codec",5031 "parity-scale-codec",
4183 "sp-runtime",5041 "sp-runtime",
4184 "sp-transaction-pool",5042 "sp-transaction-pool",
4185 "substrate-prometheus-endpoint",5043 "substrate-prometheus-endpoint",
4186 "tokio-executor 0.2.0-alpha.6",
4187]5044]
41885045
4189[[package]]5046[[package]]
4190name = "sc-block-builder"5047name = "sc-block-builder"
4191version = "0.8.0-rc4"5048version = "0.8.1"
4192source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5049source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4193dependencies = [5050dependencies = [
4194 "parity-scale-codec",5051 "parity-scale-codec",
4195 "sc-client-api",5052 "sc-client-api",
4198 "sp-blockchain",5055 "sp-blockchain",
4199 "sp-consensus",5056 "sp-consensus",
4200 "sp-core",5057 "sp-core",
5058 "sp-inherents",
4201 "sp-runtime",5059 "sp-runtime",
4202 "sp-state-machine",5060 "sp-state-machine",
4203]5061]
42045062
4205[[package]]5063[[package]]
4206name = "sc-chain-spec"5064name = "sc-chain-spec"
4207version = "2.0.0-rc4"5065version = "2.0.1"
4208source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5066source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4209dependencies = [5067dependencies = [
4210 "impl-trait-for-tuples",5068 "impl-trait-for-tuples 0.2.1",
5069 "parity-scale-codec",
4211 "sc-chain-spec-derive",5070 "sc-chain-spec-derive",
5071 "sc-consensus-babe",
5072 "sc-consensus-epochs",
5073 "sc-finality-grandpa",
4212 "sc-network",5074 "sc-network",
4213 "sc-telemetry",5075 "sc-telemetry",
4214 "serde",5076 "serde",
4215 "serde_json",5077 "serde_json",
4216 "sp-chain-spec",5078 "sp-chain-spec",
5079 "sp-consensus-babe",
4217 "sp-core",5080 "sp-core",
4218 "sp-runtime",5081 "sp-runtime",
4219]5082]
42205083
4221[[package]]5084[[package]]
4222name = "sc-chain-spec-derive"5085name = "sc-chain-spec-derive"
4223version = "2.0.0-rc4"5086version = "2.0.1"
4224source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5087source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4225dependencies = [5088dependencies = [
4226 "proc-macro-crate",5089 "proc-macro-crate",
4227 "proc-macro2",5090 "proc-macro2",
4228 "quote 1.0.7",5091 "quote",
4229 "syn 1.0.34",5092 "syn",
4230]5093]
42315094
4232[[package]]5095[[package]]
4233name = "sc-cli"5096name = "sc-cli"
4234version = "0.8.0-rc4"5097version = "0.8.1"
4235source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5098source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4236dependencies = [5099dependencies = [
4237 "ansi_term 0.12.1",
4238 "atty",
4239 "chrono",5100 "chrono",
4240 "derive_more",
4241 "env_logger",
4242 "fdlimit",5101 "fdlimit",
4243 "futures 0.3.5",5102 "futures 0.3.12",
4244 "lazy_static",5103 "hex",
5104 "libp2p",
4245 "log",5105 "log",
4246 "names",5106 "names",
4247 "nix",5107 "parity-scale-codec",
4248 "parity-util-mem",5108 "rand 0.7.3",
4249 "regex",5109 "regex",
4250 "rpassword",5110 "rpassword",
4251 "sc-client-api",5111 "sc-client-api",
4252 "sc-informant",5112 "sc-keystore",
4253 "sc-network",5113 "sc-network",
4254 "sc-service",5114 "sc-service",
4255 "sc-telemetry",5115 "sc-telemetry",
4256 "sc-tracing",5116 "sc-tracing",
5117 "serde",
4257 "serde_json",5118 "serde_json",
4258 "sp-blockchain",5119 "sp-blockchain",
4259 "sp-core",5120 "sp-core",
4260 "sp-keyring",5121 "sp-keyring",
5122 "sp-keystore",
4261 "sp-panic-handler",5123 "sp-panic-handler",
4262 "sp-runtime",5124 "sp-runtime",
4263 "sp-state-machine",
4264 "sp-utils",5125 "sp-utils",
4265 "sp-version",5126 "sp-version",
4266 "structopt",5127 "structopt",
4267 "substrate-prometheus-endpoint",5128 "thiserror",
4268 "time",5129 "tiny-bip39",
4269 "tokio 0.2.21",5130 "tokio 0.2.25",
4270]5131]
42715132
4272[[package]]5133[[package]]
4273name = "sc-client-api"5134name = "sc-client-api"
4274version = "2.0.0-rc4"5135version = "2.0.1"
4275source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5136source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4276dependencies = [5137dependencies = [
4277 "derive_more",5138 "derive_more",
4278 "fnv",5139 "fnv",
4279 "futures 0.3.5",5140 "futures 0.3.12",
4280 "hash-db",5141 "hash-db",
4281 "hex-literal",
4282 "kvdb",5142 "kvdb",
4283 "lazy_static",5143 "lazy_static",
4284 "log",5144 "log",
4285 "parity-scale-codec",5145 "parity-scale-codec",
4286 "parking_lot 0.10.2",5146 "parking_lot 0.11.1",
4287 "sc-executor",5147 "sc-executor",
4288 "sc-telemetry",
4289 "sp-api",5148 "sp-api",
4290 "sp-blockchain",5149 "sp-blockchain",
4291 "sp-consensus",5150 "sp-consensus",
4292 "sp-core",5151 "sp-core",
4293 "sp-database",5152 "sp-database",
4294 "sp-externalities",5153 "sp-externalities",
4295 "sp-inherents",5154 "sp-inherents",
4296 "sp-keyring",5155 "sp-keystore",
4297 "sp-runtime",5156 "sp-runtime",
4298 "sp-state-machine",5157 "sp-state-machine",
4299 "sp-std",5158 "sp-std",
43075166
4308[[package]]5167[[package]]
4309name = "sc-client-db"5168name = "sc-client-db"
4310version = "0.8.0-rc4"5169version = "0.8.1"
4311source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5170source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4312dependencies = [5171dependencies = [
4313 "blake2-rfc",5172 "blake2-rfc",
4314 "hash-db",5173 "hash-db",
4320 "parity-db",5179 "parity-db",
4321 "parity-scale-codec",5180 "parity-scale-codec",
4322 "parity-util-mem",5181 "parity-util-mem",
4323 "parking_lot 0.10.2",5182 "parking_lot 0.11.1",
4324 "sc-client-api",5183 "sc-client-api",
4325 "sc-executor",5184 "sc-executor",
4326 "sc-state-db",5185 "sc-state-db",
5186 "sp-arithmetic",
4327 "sp-blockchain",5187 "sp-blockchain",
4328 "sp-consensus",5188 "sp-consensus",
4329 "sp-core",5189 "sp-core",
43365196
4337[[package]]5197[[package]]
4338name = "sc-consensus"5198name = "sc-consensus"
4339version = "0.8.0-rc4"5199version = "0.8.1"
4340source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5200source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4341dependencies = [5201dependencies = [
4342 "sc-client-api",5202 "sc-client-api",
4343 "sp-blockchain",5203 "sp-blockchain",
43475207
4348[[package]]5208[[package]]
4349name = "sc-consensus-aura"5209name = "sc-consensus-aura"
4350version = "0.8.0-rc4"5210version = "0.8.1"
4351source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5211source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4352dependencies = [5212dependencies = [
4353 "derive_more",5213 "derive_more",
4354 "futures 0.3.5",5214 "futures 0.3.12",
4355 "futures-timer 3.0.2",5215 "futures-timer 3.0.2",
4356 "log",5216 "log",
4357 "parity-scale-codec",5217 "parity-scale-codec",
4358 "parking_lot 0.10.2",5218 "parking_lot 0.11.1",
4359 "sc-block-builder",5219 "sc-block-builder",
4360 "sc-client-api",5220 "sc-client-api",
4361 "sc-consensus-slots",5221 "sc-consensus-slots",
4362 "sc-keystore",
4363 "sc-telemetry",5222 "sc-telemetry",
4364 "sp-api",5223 "sp-api",
4365 "sp-application-crypto",5224 "sp-application-crypto",
4370 "sp-core",5229 "sp-core",
4371 "sp-inherents",5230 "sp-inherents",
4372 "sp-io",5231 "sp-io",
5232 "sp-keystore",
4373 "sp-runtime",5233 "sp-runtime",
4374 "sp-timestamp",5234 "sp-timestamp",
4375 "sp-version",5235 "sp-version",
4376 "substrate-prometheus-endpoint",5236 "substrate-prometheus-endpoint",
4377]5237]
43785238
4379[[package]]5239[[package]]
5240name = "sc-consensus-babe"
5241version = "0.8.1"
5242source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5243dependencies = [
5244 "derive_more",
5245 "fork-tree",
5246 "futures 0.3.12",
5247 "futures-timer 3.0.2",
5248 "log",
5249 "merlin",
5250 "num-bigint",
5251 "num-rational",
5252 "num-traits",
5253 "parity-scale-codec",
5254 "parking_lot 0.11.1",
5255 "pdqselect",
5256 "rand 0.7.3",
5257 "retain_mut",
5258 "sc-client-api",
5259 "sc-consensus-epochs",
5260 "sc-consensus-slots",
5261 "sc-consensus-uncles",
5262 "sc-keystore",
5263 "sc-telemetry",
5264 "schnorrkel",
5265 "serde",
5266 "sp-api",
5267 "sp-application-crypto",
5268 "sp-block-builder",
5269 "sp-blockchain",
5270 "sp-consensus",
5271 "sp-consensus-babe",
5272 "sp-consensus-vrf",
5273 "sp-core",
5274 "sp-inherents",
5275 "sp-io",
5276 "sp-keystore",
5277 "sp-runtime",
5278 "sp-timestamp",
5279 "sp-utils",
5280 "sp-version",
5281 "substrate-prometheus-endpoint",
5282]
5283
5284[[package]]
5285name = "sc-consensus-epochs"
5286version = "0.8.1"
5287source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5288dependencies = [
5289 "fork-tree",
5290 "parity-scale-codec",
5291 "parking_lot 0.11.1",
5292 "sc-client-api",
5293 "sp-blockchain",
5294 "sp-runtime",
5295]
5296
5297[[package]]
4380name = "sc-consensus-slots"5298name = "sc-consensus-slots"
4381version = "0.8.0-rc4"5299version = "0.8.1"
4382source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5300source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4383dependencies = [5301dependencies = [
4384 "futures 0.3.5",5302 "futures 0.3.12",
4385 "futures-timer 3.0.2",5303 "futures-timer 3.0.2",
4386 "log",5304 "log",
4387 "parity-scale-codec",5305 "parity-scale-codec",
4388 "parking_lot 0.10.2",5306 "parking_lot 0.11.1",
4389 "sc-client-api",5307 "sc-client-api",
4390 "sc-telemetry",5308 "sc-telemetry",
4391 "sp-api",5309 "sp-api",
4392 "sp-application-crypto",5310 "sp-application-crypto",
5311 "sp-arithmetic",
4393 "sp-blockchain",5312 "sp-blockchain",
4394 "sp-consensus",5313 "sp-consensus",
5314 "sp-consensus-slots",
4395 "sp-core",5315 "sp-core",
4396 "sp-inherents",5316 "sp-inherents",
4397 "sp-runtime",5317 "sp-runtime",
4398 "sp-state-machine",5318 "sp-state-machine",
5319 "sp-trie",
5320 "thiserror",
4399]5321]
44005322
4401[[package]]5323[[package]]
5324name = "sc-consensus-uncles"
5325version = "0.8.1"
5326source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5327dependencies = [
5328 "log",
5329 "sc-client-api",
5330 "sp-authorship",
5331 "sp-consensus",
5332 "sp-core",
5333 "sp-inherents",
5334 "sp-runtime",
5335]
5336
5337[[package]]
4402name = "sc-executor"5338name = "sc-executor"
4403version = "0.8.0-rc4"5339version = "0.8.1"
4404source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5340source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4405dependencies = [5341dependencies = [
4406 "derive_more",5342 "derive_more",
4407 "lazy_static",5343 "lazy_static",
4408 "libsecp256k1",5344 "libsecp256k1",
4409 "log",5345 "log",
4410 "parity-scale-codec",5346 "parity-scale-codec",
4411 "parity-wasm",5347 "parity-wasm",
4412 "parking_lot 0.10.2",5348 "parking_lot 0.11.1",
4413 "sc-executor-common",5349 "sc-executor-common",
4414 "sc-executor-wasmi",5350 "sc-executor-wasmi",
5351 "sc-executor-wasmtime",
4415 "sp-api",5352 "sp-api",
4416 "sp-core",5353 "sp-core",
4417 "sp-externalities",5354 "sp-externalities",
4418 "sp-io",5355 "sp-io",
4419 "sp-panic-handler",5356 "sp-panic-handler",
4420 "sp-runtime-interface",5357 "sp-runtime-interface",
4421 "sp-serializer",5358 "sp-serializer",
5359 "sp-tasks",
4422 "sp-trie",5360 "sp-trie",
4423 "sp-version",5361 "sp-version",
4424 "sp-wasm-interface",5362 "sp-wasm-interface",
44275365
4428[[package]]5366[[package]]
4429name = "sc-executor-common"5367name = "sc-executor-common"
4430version = "0.8.0-rc4"5368version = "0.8.1"
4431source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5369source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4432dependencies = [5370dependencies = [
4433 "derive_more",5371 "derive_more",
4434 "log",
4435 "parity-scale-codec",5372 "parity-scale-codec",
4436 "parity-wasm",5373 "parity-wasm",
4437 "sp-allocator",5374 "sp-allocator",
4438 "sp-core",5375 "sp-core",
4439 "sp-runtime-interface",
4440 "sp-serializer",5376 "sp-serializer",
4441 "sp-wasm-interface",5377 "sp-wasm-interface",
5378 "thiserror",
4442 "wasmi",5379 "wasmi",
4443]5380]
44445381
4445[[package]]5382[[package]]
4446name = "sc-executor-wasmi"5383name = "sc-executor-wasmi"
4447version = "0.8.0-rc4"5384version = "0.8.1"
4448source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5385source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4449dependencies = [5386dependencies = [
4450 "log",5387 "log",
4451 "parity-scale-codec",5388 "parity-scale-codec",
4458]5395]
44595396
4460[[package]]5397[[package]]
5398name = "sc-executor-wasmtime"
5399version = "0.8.1"
5400source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5401dependencies = [
5402 "log",
5403 "parity-scale-codec",
5404 "parity-wasm",
5405 "pwasm-utils 0.14.0",
5406 "sc-executor-common",
5407 "scoped-tls",
5408 "sp-allocator",
5409 "sp-core",
5410 "sp-runtime-interface",
5411 "sp-wasm-interface",
5412 "wasmtime",
5413]
5414
5415[[package]]
4461name = "sc-finality-grandpa"5416name = "sc-finality-grandpa"
4462version = "0.8.0-rc4"5417version = "0.8.1"
4463source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5418source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4464dependencies = [5419dependencies = [
4465 "assert_matches",
4466 "derive_more",5420 "derive_more",
4467 "finality-grandpa",5421 "finality-grandpa",
4468 "fork-tree",5422 "fork-tree",
4469 "futures 0.3.5",5423 "futures 0.3.12",
4470 "futures-timer 3.0.2",5424 "futures-timer 3.0.2",
5425 "linked-hash-map",
4471 "log",5426 "log",
4472 "parity-scale-codec",5427 "parity-scale-codec",
4473 "parking_lot 0.10.2",5428 "parking_lot 0.11.1",
4474 "pin-project",5429 "pin-project 0.4.27",
4475 "rand 0.7.3",5430 "rand 0.7.3",
4476 "sc-block-builder",5431 "sc-block-builder",
4477 "sc-client-api",5432 "sc-client-api",
4488 "sp-consensus",5443 "sp-consensus",
4489 "sp-core",5444 "sp-core",
4490 "sp-finality-grandpa",5445 "sp-finality-grandpa",
4491 "sp-finality-tracker",
4492 "sp-inherents",5446 "sp-inherents",
5447 "sp-keystore",
4493 "sp-runtime",5448 "sp-runtime",
4494 "sp-utils",5449 "sp-utils",
4495 "substrate-prometheus-endpoint",5450 "substrate-prometheus-endpoint",
4496]5451]
44975452
4498[[package]]5453[[package]]
4499name = "sc-informant"5454name = "sc-informant"
4500version = "0.8.0-rc4"5455version = "0.8.1"
4501source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5456source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4502dependencies = [5457dependencies = [
4503 "ansi_term 0.12.1",5458 "ansi_term 0.12.1",
4504 "futures 0.3.5",5459 "futures 0.3.12",
4505 "log",5460 "log",
4506 "parity-util-mem",5461 "parity-util-mem",
4507 "parking_lot 0.10.2",
4508 "sc-client-api",5462 "sc-client-api",
4509 "sc-network",5463 "sc-network",
4510 "sp-blockchain",5464 "sp-blockchain",
45165470
4517[[package]]5471[[package]]
4518name = "sc-keystore"5472name = "sc-keystore"
4519version = "2.0.0-rc4"5473version = "2.0.1"
4520source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5474source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4521dependencies = [5475dependencies = [
5476 "async-trait",
4522 "derive_more",5477 "derive_more",
5478 "futures 0.3.12",
5479 "futures-util",
4523 "hex",5480 "hex",
4524 "merlin",5481 "merlin",
4525 "parking_lot 0.10.2",5482 "parking_lot 0.11.1",
4526 "rand 0.7.3",5483 "rand 0.7.3",
4527 "serde_json",5484 "serde_json",
4528 "sp-application-crypto",5485 "sp-application-crypto",
4529 "sp-core",5486 "sp-core",
4530 "subtle 2.2.3",5487 "sp-keystore",
5488 "subtle 2.4.0",
4531]5489]
45325490
4533[[package]]5491[[package]]
4534name = "sc-light"5492name = "sc-light"
4535version = "2.0.0-rc4"5493version = "2.0.1"
4536source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5494source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4537dependencies = [5495dependencies = [
4538 "hash-db",5496 "hash-db",
4539 "lazy_static",5497 "lazy_static",
4540 "parity-scale-codec",5498 "parity-scale-codec",
4541 "parking_lot 0.10.2",5499 "parking_lot 0.11.1",
4542 "sc-client-api",5500 "sc-client-api",
4543 "sc-executor",5501 "sc-executor",
4544 "sp-api",5502 "sp-api",
45515509
4552[[package]]5510[[package]]
4553name = "sc-network"5511name = "sc-network"
4554version = "0.8.0-rc4"5512version = "0.8.1"
4555source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5513source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4556dependencies = [5514dependencies = [
5515 "async-std",
5516 "async-trait",
5517 "asynchronous-codec 0.5.0",
4557 "bitflags",5518 "bitflags",
4558 "bs58",5519 "bs58",
4559 "bytes 0.5.6",5520 "bytes 1.0.1",
4560 "derive_more",5521 "derive_more",
4561 "either",5522 "either",
4562 "erased-serde",5523 "erased-serde",
4563 "fnv",5524 "fnv",
4564 "fork-tree",5525 "fork-tree",
4565 "futures 0.3.5",5526 "futures 0.3.12",
4566 "futures-timer 3.0.2",5527 "futures-timer 3.0.2",
4567 "futures_codec 0.3.4",
4568 "hex",5528 "hex",
4569 "ip_network",5529 "ip_network",
4570 "libp2p",5530 "libp2p",
4574 "lru",5534 "lru",
4575 "nohash-hasher",5535 "nohash-hasher",
4576 "parity-scale-codec",5536 "parity-scale-codec",
4577 "parking_lot 0.10.2",5537 "parking_lot 0.11.1",
4578 "pin-project",5538 "pin-project 0.4.27",
4579 "prost",5539 "prost",
4580 "prost-build",5540 "prost-build",
4581 "rand 0.7.3",5541 "rand 0.7.3",
4584 "sc-peerset",5544 "sc-peerset",
4585 "serde",5545 "serde",
4586 "serde_json",5546 "serde_json",
4587 "slog",5547 "smallvec 1.6.1",
4588 "slog_derive",
4589 "smallvec 0.6.13",
4590 "sp-arithmetic",5548 "sp-arithmetic",
4591 "sp-blockchain",5549 "sp-blockchain",
4592 "sp-consensus",5550 "sp-consensus",
4595 "sp-utils",5553 "sp-utils",
4596 "substrate-prometheus-endpoint",5554 "substrate-prometheus-endpoint",
4597 "thiserror",5555 "thiserror",
4598 "unsigned-varint 0.3.3",5556 "unsigned-varint 0.6.0",
4599 "void",5557 "void",
4600 "wasm-timer",5558 "wasm-timer",
4601 "zeroize",5559 "zeroize",
4602]5560]
46035561
4604[[package]]5562[[package]]
4605name = "sc-network-gossip"5563name = "sc-network-gossip"
4606version = "0.8.0-rc4"5564version = "0.8.1"
4607source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5565source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4608dependencies = [5566dependencies = [
4609 "futures 0.3.5",5567 "futures 0.3.12",
4610 "futures-timer 3.0.2",5568 "futures-timer 3.0.2",
4611 "libp2p",5569 "libp2p",
4612 "log",5570 "log",
4613 "lru",5571 "lru",
4614 "sc-network",5572 "sc-network",
4615 "sp-runtime",5573 "sp-runtime",
5574 "substrate-prometheus-endpoint",
4616 "wasm-timer",5575 "wasm-timer",
4617]5576]
46185577
4619[[package]]5578[[package]]
4620name = "sc-offchain"5579name = "sc-offchain"
4621version = "2.0.0-rc4"5580version = "2.0.1"
4622source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5581source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4623dependencies = [5582dependencies = [
4624 "bytes 0.5.6",5583 "bytes 0.5.6",
4625 "fnv",5584 "fnv",
4626 "futures 0.3.5",5585 "futures 0.3.12",
4627 "futures-timer 3.0.2",5586 "futures-timer 3.0.2",
4628 "hyper 0.13.7",5587 "hyper 0.13.10",
4629 "hyper-rustls",5588 "hyper-rustls",
4630 "log",5589 "log",
4631 "num_cpus",5590 "num_cpus",
4632 "parity-scale-codec",5591 "parity-scale-codec",
4633 "parking_lot 0.10.2",5592 "parking_lot 0.11.1",
4634 "rand 0.7.3",5593 "rand 0.7.3",
4635 "sc-client-api",5594 "sc-client-api",
4636 "sc-keystore",5595 "sc-keystore",
46455604
4646[[package]]5605[[package]]
4647name = "sc-peerset"5606name = "sc-peerset"
4648version = "2.0.0-rc4"5607version = "2.0.1"
4649source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5608source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4650dependencies = [5609dependencies = [
4651 "futures 0.3.5",5610 "futures 0.3.12",
4652 "libp2p",5611 "libp2p",
4653 "log",5612 "log",
4654 "serde_json",5613 "serde_json",
46585617
4659[[package]]5618[[package]]
4660name = "sc-proposer-metrics"5619name = "sc-proposer-metrics"
4661version = "0.8.0-rc4"5620version = "0.8.1"
4662source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5621source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4663dependencies = [5622dependencies = [
4664 "log",5623 "log",
4665 "substrate-prometheus-endpoint",5624 "substrate-prometheus-endpoint",
4666]5625]
46675626
4668[[package]]5627[[package]]
4669name = "sc-rpc"5628name = "sc-rpc"
4670version = "2.0.0-rc4"5629version = "2.0.1"
4671source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5630source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4672dependencies = [5631dependencies = [
4673 "futures 0.3.5",5632 "futures 0.3.12",
4674 "hash-db",5633 "hash-db",
4675 "jsonrpc-core",5634 "jsonrpc-core",
4676 "jsonrpc-pubsub",5635 "jsonrpc-pubsub",
4677 "log",5636 "log",
4678 "parity-scale-codec",5637 "parity-scale-codec",
4679 "parking_lot 0.10.2",5638 "parking_lot 0.11.1",
4680 "sc-block-builder",5639 "sc-block-builder",
4681 "sc-client-api",5640 "sc-client-api",
4682 "sc-executor",5641 "sc-executor",
4683 "sc-keystore",5642 "sc-keystore",
4684 "sc-rpc-api",5643 "sc-rpc-api",
5644 "sc-tracing",
4685 "serde_json",5645 "serde_json",
4686 "sp-api",5646 "sp-api",
4687 "sp-blockchain",5647 "sp-blockchain",
4688 "sp-chain-spec",5648 "sp-chain-spec",
4689 "sp-core",5649 "sp-core",
5650 "sp-keystore",
4690 "sp-offchain",5651 "sp-offchain",
4691 "sp-rpc",5652 "sp-rpc",
4692 "sp-runtime",5653 "sp-runtime",
46995660
4700[[package]]5661[[package]]
4701name = "sc-rpc-api"5662name = "sc-rpc-api"
4702version = "0.8.0-rc4"5663version = "0.8.1"
4703source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5664source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4704dependencies = [5665dependencies = [
4705 "derive_more",5666 "derive_more",
4706 "futures 0.3.5",5667 "futures 0.3.12",
4707 "jsonrpc-core",5668 "jsonrpc-core",
4708 "jsonrpc-core-client",5669 "jsonrpc-core-client",
4709 "jsonrpc-derive",5670 "jsonrpc-derive",
4710 "jsonrpc-pubsub",5671 "jsonrpc-pubsub",
4711 "log",5672 "log",
4712 "parity-scale-codec",5673 "parity-scale-codec",
4713 "parking_lot 0.10.2",5674 "parking_lot 0.11.1",
4714 "serde",5675 "serde",
4715 "serde_json",5676 "serde_json",
4716 "sp-chain-spec",5677 "sp-chain-spec",
47235684
4724[[package]]5685[[package]]
4725name = "sc-rpc-server"5686name = "sc-rpc-server"
4726version = "2.0.0-rc4"5687version = "2.0.1"
4727source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5688source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4728dependencies = [5689dependencies = [
5690 "futures 0.1.30",
4729 "jsonrpc-core",5691 "jsonrpc-core",
4730 "jsonrpc-http-server",5692 "jsonrpc-http-server",
4731 "jsonrpc-ipc-server",5693 "jsonrpc-ipc-server",
4735 "serde",5697 "serde",
4736 "serde_json",5698 "serde_json",
4737 "sp-runtime",5699 "sp-runtime",
5700 "substrate-prometheus-endpoint",
4738]5701]
47395702
4740[[package]]5703[[package]]
4741name = "sc-service"5704name = "sc-service"
4742version = "0.8.0-rc4"5705version = "0.8.1"
4743source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5706source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4744dependencies = [5707dependencies = [
4745 "derive_more",5708 "directories 3.0.1",
4746 "directories",
4747 "exit-future",5709 "exit-future",
4748 "futures 0.1.29",5710 "futures 0.1.30",
4749 "futures 0.3.5",5711 "futures 0.3.12",
4750 "futures-timer 3.0.2",5712 "futures-timer 3.0.2",
4751 "hash-db",5713 "hash-db",
5714 "jsonrpc-core",
4752 "jsonrpc-pubsub",5715 "jsonrpc-pubsub",
4753 "lazy_static",5716 "lazy_static",
4754 "log",5717 "log",
4755 "netstat2",
4756 "parity-multiaddr 0.7.3",
4757 "parity-scale-codec",5718 "parity-scale-codec",
4758 "parity-util-mem",5719 "parity-util-mem",
4759 "parking_lot 0.10.2",5720 "parking_lot 0.11.1",
4760 "pin-project",5721 "pin-project 0.4.27",
4761 "procfs",
4762 "rand 0.7.3",5722 "rand 0.7.3",
4763 "sc-block-builder",5723 "sc-block-builder",
4764 "sc-chain-spec",5724 "sc-chain-spec",
4777 "sc-transaction-pool",5737 "sc-transaction-pool",
4778 "serde",5738 "serde",
4779 "serde_json",5739 "serde_json",
4780 "slog",
4781 "sp-api",5740 "sp-api",
4782 "sp-application-crypto",5741 "sp-application-crypto",
4783 "sp-block-builder",5742 "sp-block-builder",
4784 "sp-blockchain",5743 "sp-blockchain",
4785 "sp-consensus",5744 "sp-consensus",
4786 "sp-core",5745 "sp-core",
4787 "sp-externalities",5746 "sp-externalities",
5747 "sp-inherents",
4788 "sp-io",5748 "sp-io",
5749 "sp-keystore",
4789 "sp-runtime",5750 "sp-runtime",
4790 "sp-session",5751 "sp-session",
4791 "sp-state-machine",5752 "sp-state-machine",
5753 "sp-tracing",
4792 "sp-transaction-pool",5754 "sp-transaction-pool",
4793 "sp-trie",5755 "sp-trie",
4794 "sp-utils",5756 "sp-utils",
4795 "sp-version",5757 "sp-version",
4796 "substrate-prometheus-endpoint",5758 "substrate-prometheus-endpoint",
4797 "sysinfo",
4798 "tempfile",5759 "tempfile",
5760 "thiserror",
4799 "tracing",5761 "tracing",
5762 "tracing-futures",
4800 "wasm-timer",5763 "wasm-timer",
4801]5764]
48025765
4803[[package]]5766[[package]]
4804name = "sc-state-db"5767name = "sc-state-db"
4805version = "0.8.0-rc4"5768version = "0.8.1"
4806source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5769source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4807dependencies = [5770dependencies = [
4808 "log",5771 "log",
4809 "parity-scale-codec",5772 "parity-scale-codec",
4810 "parity-util-mem",5773 "parity-util-mem",
4811 "parity-util-mem-derive",5774 "parity-util-mem-derive",
4812 "parking_lot 0.10.2",5775 "parking_lot 0.11.1",
4813 "sc-client-api",5776 "sc-client-api",
4814 "sp-core",5777 "sp-core",
5778 "thiserror",
4815]5779]
48165780
4817[[package]]5781[[package]]
4818name = "sc-telemetry"5782name = "sc-telemetry"
4819version = "2.0.0-rc4"5783version = "2.0.1"
4820source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5784source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4821dependencies = [5785dependencies = [
4822 "bytes 0.5.6",5786 "chrono",
4823 "futures 0.3.5",5787 "futures 0.3.12",
4824 "futures-timer 3.0.2",
4825 "libp2p",5788 "libp2p",
4826 "log",5789 "log",
4827 "parking_lot 0.10.2",5790 "parking_lot 0.11.1",
4828 "pin-project",5791 "pin-project 0.4.27",
4829 "rand 0.7.3",5792 "rand 0.7.3",
4830 "serde",5793 "serde",
4831 "slog",5794 "serde_json",
4832 "slog-json",5795 "sp-utils",
4833 "slog-scope",
4834 "take_mut",5796 "take_mut",
5797 "tracing",
5798 "tracing-subscriber",
4835 "void",5799 "void",
4836 "wasm-timer",5800 "wasm-timer",
4837]5801]
48385802
4839[[package]]5803[[package]]
4840name = "sc-tracing"5804name = "sc-tracing"
4841version = "2.0.0-rc4"5805version = "2.0.1"
4842source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5806source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4843dependencies = [5807dependencies = [
5808 "ansi_term 0.12.1",
5809 "atty",
4844 "erased-serde",5810 "erased-serde",
5811 "lazy_static",
4845 "log",5812 "log",
4846 "parking_lot 0.10.2",5813 "once_cell",
5814 "parking_lot 0.11.1",
5815 "regex",
4847 "rustc-hash",5816 "rustc-hash",
4848 "sc-telemetry",5817 "sc-telemetry",
5818 "sc-tracing-proc-macro",
4849 "serde",5819 "serde",
4850 "serde_json",5820 "serde_json",
4851 "slog",
4852 "sp-tracing",5821 "sp-tracing",
5822 "thiserror",
5823 "tracing",
4853 "tracing-core",5824 "tracing-core",
5825 "tracing-log",
5826 "tracing-subscriber",
5827 "wasm-bindgen",
5828 "web-sys",
4854]5829]
48555830
4856[[package]]5831[[package]]
5832name = "sc-tracing-proc-macro"
5833version = "2.0.0"
5834source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5835dependencies = [
5836 "proc-macro-crate",
5837 "proc-macro2",
5838 "quote",
5839 "syn",
5840]
5841
5842[[package]]
4857name = "sc-transaction-graph"5843name = "sc-transaction-graph"
4858version = "2.0.0-rc4"5844version = "2.0.1"
4859source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5845source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4860dependencies = [5846dependencies = [
4861 "derive_more",5847 "derive_more",
4862 "futures 0.3.5",5848 "futures 0.3.12",
4863 "linked-hash-map",5849 "linked-hash-map",
4864 "log",5850 "log",
4865 "parity-util-mem",5851 "parity-util-mem",
4866 "parking_lot 0.10.2",5852 "parking_lot 0.11.1",
5853 "retain_mut",
4867 "serde",5854 "serde",
4868 "sp-blockchain",5855 "sp-blockchain",
4869 "sp-core",5856 "sp-core",
4870 "sp-runtime",5857 "sp-runtime",
4871 "sp-transaction-pool",5858 "sp-transaction-pool",
4872 "sp-utils",5859 "sp-utils",
5860 "thiserror",
4873 "wasm-timer",5861 "wasm-timer",
4874]5862]
48755863
4876[[package]]5864[[package]]
4877name = "sc-transaction-pool"5865name = "sc-transaction-pool"
4878version = "2.0.0-rc4"5866version = "2.0.1"
4879source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5867source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
4880dependencies = [5868dependencies = [
4881 "derive_more",5869 "futures 0.3.12",
4882 "futures 0.3.5",
4883 "futures-diagnose",5870 "futures-diagnose",
4884 "intervalier",5871 "intervalier",
4885 "log",5872 "log",
4886 "parity-scale-codec",5873 "parity-scale-codec",
4887 "parity-util-mem",5874 "parity-util-mem",
4888 "parking_lot 0.10.2",5875 "parking_lot 0.11.1",
4889 "sc-client-api",5876 "sc-client-api",
4890 "sc-transaction-graph",5877 "sc-transaction-graph",
4891 "sp-api",5878 "sp-api",
4896 "sp-transaction-pool",5883 "sp-transaction-pool",
4897 "sp-utils",5884 "sp-utils",
4898 "substrate-prometheus-endpoint",5885 "substrate-prometheus-endpoint",
5886 "thiserror",
4899 "wasm-timer",5887 "wasm-timer",
4900]5888]
49015889
4916checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862"5904checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862"
4917dependencies = [5905dependencies = [
4918 "arrayref",5906 "arrayref",
4919 "arrayvec 0.5.1",5907 "arrayvec 0.5.2",
4920 "curve25519-dalek",5908 "curve25519-dalek 2.1.2",
4921 "getrandom",5909 "getrandom 0.1.16",
4922 "merlin",5910 "merlin",
4923 "rand 0.7.3",5911 "rand 0.7.3",
4924 "rand_core 0.5.1",5912 "rand_core 0.5.1",
5913 "serde",
4925 "sha2 0.8.2",5914 "sha2 0.8.2",
4926 "subtle 2.2.3",5915 "subtle 2.4.0",
4927 "zeroize",5916 "zeroize",
4928]5917]
49295918
4930[[package]]5919[[package]]
5920name = "scoped-tls"
5921version = "1.0.0"
5922source = "registry+https://github.com/rust-lang/crates.io-index"
5923checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
5924
5925[[package]]
4931name = "scopeguard"5926name = "scopeguard"
4932version = "1.1.0"5927version = "1.1.0"
4933source = "registry+https://github.com/rust-lang/crates.io-index"5928source = "registry+https://github.com/rust-lang/crates.io-index"
4934checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"5929checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
49355930
4936[[package]]5931[[package]]
5932name = "scroll"
5933version = "0.10.2"
5934source = "registry+https://github.com/rust-lang/crates.io-index"
5935checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec"
5936dependencies = [
5937 "scroll_derive",
5938]
5939
5940[[package]]
5941name = "scroll_derive"
5942version = "0.10.5"
5943source = "registry+https://github.com/rust-lang/crates.io-index"
5944checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0"
5945dependencies = [
5946 "proc-macro2",
5947 "quote",
5948 "syn",
5949]
5950
5951[[package]]
4937name = "sct"5952name = "sct"
4938version = "0.6.0"5953version = "0.6.0"
4939source = "registry+https://github.com/rust-lang/crates.io-index"5954source = "registry+https://github.com/rust-lang/crates.io-index"
4944]5959]
49455960
4946[[package]]5961[[package]]
5962name = "secrecy"
5963version = "0.7.0"
5964source = "registry+https://github.com/rust-lang/crates.io-index"
5965checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0"
5966dependencies = [
5967 "zeroize",
5968]
5969
5970[[package]]
4947name = "security-framework"5971name = "security-framework"
4948version = "0.4.4"5972version = "1.0.0"
4949source = "registry+https://github.com/rust-lang/crates.io-index"5973source = "registry+https://github.com/rust-lang/crates.io-index"
4950checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535"5974checksum = "ad502866817f0575705bd7be36e2b2535cc33262d493aa733a2ec862baa2bc2b"
4951dependencies = [5975dependencies = [
4952 "bitflags",5976 "bitflags",
4953 "core-foundation",5977 "core-foundation",
49585982
4959[[package]]5983[[package]]
4960name = "security-framework-sys"5984name = "security-framework-sys"
4961version = "0.4.3"5985version = "1.0.0"
4962source = "registry+https://github.com/rust-lang/crates.io-index"5986source = "registry+https://github.com/rust-lang/crates.io-index"
4963checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405"5987checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7"
4964dependencies = [5988dependencies = [
4965 "core-foundation-sys",5989 "core-foundation-sys",
4966 "libc",5990 "libc",
4982checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"6006checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
49836007
4984[[package]]6008[[package]]
4985name = "send_wrapper"
4986version = "0.2.0"
4987source = "registry+https://github.com/rust-lang/crates.io-index"
4988checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4"
4989
4990[[package]]
4991name = "serde"6009name = "serde"
4992version = "1.0.114"6010version = "1.0.123"
4993source = "registry+https://github.com/rust-lang/crates.io-index"6011source = "registry+https://github.com/rust-lang/crates.io-index"
4994checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3"6012checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae"
4995dependencies = [6013dependencies = [
4996 "serde_derive",6014 "serde_derive",
4997]6015]
49986016
4999[[package]]6017[[package]]
5000name = "serde_derive"6018name = "serde_derive"
5001version = "1.0.114"6019version = "1.0.123"
5002source = "registry+https://github.com/rust-lang/crates.io-index"6020source = "registry+https://github.com/rust-lang/crates.io-index"
5003checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e"6021checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31"
5004dependencies = [6022dependencies = [
5005 "proc-macro2",6023 "proc-macro2",
5006 "quote 1.0.7",6024 "quote",
5007 "syn 1.0.34",6025 "syn",
5008]6026]
50096027
5010[[package]]6028[[package]]
5011name = "serde_json"6029name = "serde_json"
5012version = "1.0.56"6030version = "1.0.62"
5013source = "registry+https://github.com/rust-lang/crates.io-index"6031source = "registry+https://github.com/rust-lang/crates.io-index"
5014checksum = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3"6032checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486"
5015dependencies = [6033dependencies = [
5016 "itoa",6034 "itoa",
5017 "ryu",6035 "ryu",
5031]6049]
50326050
5033[[package]]6051[[package]]
5034name = "sha1"6052name = "sha-1"
5035version = "0.6.0"6053version = "0.9.3"
5036source = "registry+https://github.com/rust-lang/crates.io-index"6054source = "registry+https://github.com/rust-lang/crates.io-index"
5037checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"6055checksum = "f4b312c3731e3fe78a185e6b9b911a7aa715b8e31cce117975219aab2acf285d"
6056dependencies = [
6057 "block-buffer 0.9.0",
6058 "cfg-if 1.0.0",
6059 "cpuid-bool 0.1.2",
6060 "digest 0.9.0",
6061 "opaque-debug 0.3.0",
6062]
50386063
5039[[package]]6064[[package]]
5040name = "sha2"6065name = "sha2"
50506075
5051[[package]]6076[[package]]
5052name = "sha2"6077name = "sha2"
5053version = "0.9.1"6078version = "0.9.3"
5054source = "registry+https://github.com/rust-lang/crates.io-index"6079source = "registry+https://github.com/rust-lang/crates.io-index"
5055checksum = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1"6080checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de"
5056dependencies = [6081dependencies = [
5057 "block-buffer 0.9.0",6082 "block-buffer 0.9.0",
5058 "cfg-if",6083 "cfg-if 1.0.0",
5059 "cpuid-bool",6084 "cpuid-bool 0.1.2",
5060 "digest 0.9.0",6085 "digest 0.9.0",
5061 "opaque-debug 0.3.0",6086 "opaque-debug 0.3.0",
5062]6087]
50636088
5064[[package]]6089[[package]]
5065name = "sha3"6090name = "sha3"
5066version = "0.8.2"6091version = "0.9.1"
5067source = "registry+https://github.com/rust-lang/crates.io-index"6092source = "registry+https://github.com/rust-lang/crates.io-index"
5068checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf"6093checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809"
5069dependencies = [6094dependencies = [
5070 "block-buffer 0.7.3",6095 "block-buffer 0.9.0",
5071 "byte-tools",6096 "digest 0.9.0",
5072 "digest 0.8.1",
5073 "keccak",6097 "keccak",
5074 "opaque-debug 0.2.3",6098 "opaque-debug 0.3.0",
5075]6099]
50766100
5077[[package]]6101[[package]]
6102name = "sharded-slab"
6103version = "0.1.1"
6104source = "registry+https://github.com/rust-lang/crates.io-index"
6105checksum = "79c719719ee05df97490f80a45acfc99e5a30ce98a1e4fb67aee422745ae14e3"
6106dependencies = [
6107 "lazy_static",
6108]
6109
6110[[package]]
5078name = "shlex"6111name = "shlex"
5079version = "0.1.1"6112version = "0.1.1"
5080source = "registry+https://github.com/rust-lang/crates.io-index"6113source = "registry+https://github.com/rust-lang/crates.io-index"
5081checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"6114checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
50826115
5083[[package]]6116[[package]]
5084name = "signal-hook-registry"6117name = "signal-hook"
5085version = "1.2.0"6118version = "0.3.4"
5086source = "registry+https://github.com/rust-lang/crates.io-index"6119source = "registry+https://github.com/rust-lang/crates.io-index"
5087checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41"6120checksum = "780f5e3fe0c66f67197236097d89de1e86216f1f6fdeaf47c442f854ab46c240"
5088dependencies = [6121dependencies = [
5089 "arc-swap",
5090 "libc",6122 "libc",
6123 "signal-hook-registry",
5091]6124]
50926125
5093[[package]]6126[[package]]
5094name = "slab"6127name = "signal-hook-registry"
5095version = "0.4.2"6128version = "1.3.0"
5096source = "registry+https://github.com/rust-lang/crates.io-index"6129source = "registry+https://github.com/rust-lang/crates.io-index"
5097checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"6130checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6"
5098
5099[[package]]
5100name = "slog"
5101version = "2.5.2"
5102source = "registry+https://github.com/rust-lang/crates.io-index"
5103checksum = "1cc9c640a4adbfbcc11ffb95efe5aa7af7309e002adab54b185507dbf2377b99"
5104dependencies = [6131dependencies = [
5105 "erased-serde",6132 "libc",
5106]6133]
51076134
5108[[package]]6135[[package]]
5109name = "slog-json"6136name = "signature"
5110version = "2.3.0"6137version = "1.3.0"
5111source = "registry+https://github.com/rust-lang/crates.io-index"6138source = "registry+https://github.com/rust-lang/crates.io-index"
5112checksum = "ddc0d2aff1f8f325ef660d9a0eb6e6dcd20b30b3f581a5897f58bf42d061c37a"6139checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68"
5113dependencies = [
5114 "chrono",
5115 "erased-serde",
5116 "serde",
5117 "serde_json",
5118 "slog",
5119]
51206140
5121[[package]]6141[[package]]
5122name = "slog-scope"6142name = "simba"
5123version = "4.3.0"6143version = "0.1.5"
5124source = "registry+https://github.com/rust-lang/crates.io-index"6144source = "registry+https://github.com/rust-lang/crates.io-index"
5125checksum = "7c44c89dd8b0ae4537d1ae318353eaf7840b4869c536e31c41e963d1ea523ee6"6145checksum = "fb931b1367faadea6b1ab1c306a860ec17aaa5fa39f367d0c744e69d971a1fb2"
5126dependencies = [6146dependencies = [
5127 "arc-swap",6147 "approx",
6148 "num-complex",
5128 "lazy_static",6149 "num-traits",
5129 "slog",6150 "paste",
5130]6151]
51316152
5132[[package]]6153[[package]]
5133name = "slog_derive"6154name = "slab"
5134version = "0.2.0"6155version = "0.4.2"
5135source = "registry+https://github.com/rust-lang/crates.io-index"6156source = "registry+https://github.com/rust-lang/crates.io-index"
5136checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b"6157checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
5137dependencies = [
5138 "proc-macro2",
5139 "quote 1.0.7",
5140 "syn 1.0.34",
5141]
51426158
5143[[package]]6159[[package]]
5144name = "smallvec"6160name = "smallvec"
5145version = "0.6.13"6161version = "0.6.14"
5146source = "registry+https://github.com/rust-lang/crates.io-index"6162source = "registry+https://github.com/rust-lang/crates.io-index"
5147checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6"6163checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0"
5148dependencies = [6164dependencies = [
5149 "maybe-uninit",6165 "maybe-uninit",
5150]6166]
51516167
5152[[package]]6168[[package]]
5153name = "smallvec"6169name = "smallvec"
5154version = "1.4.1"6170version = "1.6.1"
5155source = "registry+https://github.com/rust-lang/crates.io-index"6171source = "registry+https://github.com/rust-lang/crates.io-index"
5156checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f"6172checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
51576173
5158[[package]]6174[[package]]
5159name = "snow"6175name = "snow"
5160version = "0.7.1"6176version = "0.7.2"
5161source = "registry+https://github.com/rust-lang/crates.io-index"6177source = "registry+https://github.com/rust-lang/crates.io-index"
5162checksum = "32bf8474159a95551661246cda4976e89356999e3cbfef36f493dacc3fae1e8e"6178checksum = "795dd7aeeee24468e5a32661f6d27f7b5cbed802031b2d7640c7b10f8fb2dd50"
5163dependencies = [6179dependencies = [
5164 "aes-gcm",6180 "aes-gcm",
5165 "blake2 0.9.0",6181 "blake2",
5166 "chacha20poly1305",6182 "chacha20poly1305",
5167 "rand 0.7.3",6183 "rand 0.7.3",
5168 "rand_core 0.5.1",6184 "rand_core 0.5.1",
5169 "ring",6185 "ring",
5170 "rustc_version",6186 "rustc_version",
5171 "sha2 0.9.1",6187 "sha2 0.9.3",
5172 "subtle 2.2.3",6188 "subtle 2.4.0",
5173 "x25519-dalek",6189 "x25519-dalek",
5174]6190]
51756191
5176[[package]]6192[[package]]
5177name = "socket2"6193name = "socket2"
5178version = "0.3.12"6194version = "0.3.19"
5179source = "registry+https://github.com/rust-lang/crates.io-index"6195source = "registry+https://github.com/rust-lang/crates.io-index"
5180checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"6196checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
5181dependencies = [6197dependencies = [
5182 "cfg-if",6198 "cfg-if 1.0.0",
5183 "libc",6199 "libc",
5184 "redox_syscall",
5185 "winapi 0.3.9",6200 "winapi 0.3.9",
5186]6201]
51876202
5188[[package]]6203[[package]]
5189name = "soketto"6204name = "soketto"
5190version = "0.3.2"6205version = "0.4.2"
5191source = "registry+https://github.com/rust-lang/crates.io-index"6206source = "registry+https://github.com/rust-lang/crates.io-index"
5192checksum = "1c9dab3f95c9ebdf3a88268c19af668f637a3c5039c2c56ff2d40b1b2d64a25b"6207checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88"
5193dependencies = [6208dependencies = [
5194 "base64",6209 "base64 0.12.3",
5195 "bytes 0.5.6",6210 "bytes 0.5.6",
5196 "flate2",6211 "flate2",
5197 "futures 0.3.5",6212 "futures 0.3.12",
5198 "http 0.2.1",
5199 "httparse",6213 "httparse",
5200 "log",6214 "log",
5201 "rand 0.7.3",6215 "rand 0.7.3",
5202 "sha1",6216 "sha-1 0.9.3",
5203 "smallvec 1.4.1",
5204 "static_assertions",
5205 "thiserror",
5206]6217]
52076218
5208[[package]]6219[[package]]
5209name = "sp-allocator"6220name = "sp-allocator"
5210version = "2.0.0-rc4"6221version = "2.0.1"
5211source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6222source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5212dependencies = [6223dependencies = [
5213 "derive_more",
5214 "log",6224 "log",
5215 "sp-core",6225 "sp-core",
5216 "sp-std",6226 "sp-std",
5217 "sp-wasm-interface",6227 "sp-wasm-interface",
6228 "thiserror",
5218]6229]
52196230
5220[[package]]6231[[package]]
5221name = "sp-api"6232name = "sp-api"
5222version = "2.0.0-rc4"6233version = "2.0.1"
5223source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6234source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5224dependencies = [6235dependencies = [
5225 "hash-db",6236 "hash-db",
5226 "parity-scale-codec",6237 "parity-scale-codec",
5230 "sp-state-machine",6241 "sp-state-machine",
5231 "sp-std",6242 "sp-std",
5232 "sp-version",6243 "sp-version",
6244 "thiserror",
5233]6245]
52346246
5235[[package]]6247[[package]]
5236name = "sp-api-proc-macro"6248name = "sp-api-proc-macro"
5237version = "2.0.0-rc4"6249version = "2.0.1"
5238source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6250source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5239dependencies = [6251dependencies = [
5240 "blake2-rfc",6252 "blake2-rfc",
5241 "proc-macro-crate",6253 "proc-macro-crate",
5242 "proc-macro2",6254 "proc-macro2",
5243 "quote 1.0.7",6255 "quote",
5244 "syn 1.0.34",6256 "syn",
5245]6257]
52466258
5247[[package]]6259[[package]]
5248name = "sp-application-crypto"6260name = "sp-application-crypto"
5249version = "2.0.0-rc4"6261version = "2.0.1"
5250source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6262source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5251dependencies = [6263dependencies = [
5252 "parity-scale-codec",6264 "parity-scale-codec",
5253 "serde",6265 "serde",
52586270
5259[[package]]6271[[package]]
5260name = "sp-arithmetic"6272name = "sp-arithmetic"
5261version = "2.0.0-rc4"6273version = "2.0.1"
5262source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6274source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5263dependencies = [6275dependencies = [
5264 "integer-sqrt",6276 "integer-sqrt",
5265 "num-traits 0.2.12",6277 "num-traits",
5266 "parity-scale-codec",6278 "parity-scale-codec",
5267 "serde",6279 "serde",
5268 "sp-debug-derive",6280 "sp-debug-derive",
5269 "sp-std",6281 "sp-std",
5270]6282]
52716283
5272[[package]]6284[[package]]
6285name = "sp-authorship"
6286version = "2.0.1"
6287source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
6288dependencies = [
6289 "parity-scale-codec",
6290 "sp-inherents",
6291 "sp-runtime",
6292 "sp-std",
6293]
6294
6295[[package]]
5273name = "sp-block-builder"6296name = "sp-block-builder"
5274version = "2.0.0-rc4"6297version = "2.0.1"
5275source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6298source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5276dependencies = [6299dependencies = [
5277 "parity-scale-codec",6300 "parity-scale-codec",
5278 "sp-api",6301 "sp-api",
52836306
5284[[package]]6307[[package]]
5285name = "sp-blockchain"6308name = "sp-blockchain"
5286version = "2.0.0-rc4"6309version = "2.0.1"
5287source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6310source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5288dependencies = [6311dependencies = [
5289 "derive_more",6312 "futures 0.3.12",
5290 "log",6313 "log",
5291 "lru",6314 "lru",
5292 "parity-scale-codec",6315 "parity-scale-codec",
5293 "parking_lot 0.10.2",6316 "parking_lot 0.11.1",
5294 "sp-block-builder",6317 "sp-api",
5295 "sp-consensus",6318 "sp-consensus",
6319 "sp-database",
5296 "sp-runtime",6320 "sp-runtime",
5297 "sp-state-machine",6321 "sp-state-machine",
6322 "thiserror",
5298]6323]
52996324
5300[[package]]6325[[package]]
5301name = "sp-chain-spec"6326name = "sp-chain-spec"
5302version = "2.0.0-rc4"6327version = "2.0.1"
5303source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6328source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5304dependencies = [6329dependencies = [
5305 "serde",6330 "serde",
5306 "serde_json",6331 "serde_json",
5307]6332]
53086333
5309[[package]]6334[[package]]
5310name = "sp-consensus"6335name = "sp-consensus"
5311version = "0.8.0-rc4"6336version = "0.8.1"
5312source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6337source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5313dependencies = [6338dependencies = [
5314 "derive_more",6339 "futures 0.3.12",
5315 "futures 0.3.5",
5316 "futures-timer 3.0.2",6340 "futures-timer 3.0.2",
5317 "libp2p",6341 "libp2p",
5318 "log",6342 "log",
5319 "parity-scale-codec",6343 "parity-scale-codec",
5320 "parking_lot 0.10.2",6344 "parking_lot 0.11.1",
5321 "serde",6345 "serde",
6346 "sp-api",
5322 "sp-core",6347 "sp-core",
5323 "sp-inherents",6348 "sp-inherents",
5324 "sp-runtime",6349 "sp-runtime",
5325 "sp-state-machine",6350 "sp-state-machine",
5326 "sp-std",6351 "sp-std",
6352 "sp-trie",
5327 "sp-utils",6353 "sp-utils",
5328 "sp-version",6354 "sp-version",
5329 "substrate-prometheus-endpoint",6355 "substrate-prometheus-endpoint",
6356 "thiserror",
5330 "wasm-timer",6357 "wasm-timer",
5331]6358]
53326359
5333[[package]]6360[[package]]
5334name = "sp-consensus-aura"6361name = "sp-consensus-aura"
5335version = "0.8.0-rc4"6362version = "0.8.1"
5336source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6363source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5337dependencies = [6364dependencies = [
5338 "parity-scale-codec",6365 "parity-scale-codec",
5339 "sp-api",6366 "sp-api",
5345]6372]
53466373
5347[[package]]6374[[package]]
6375name = "sp-consensus-babe"
6376version = "0.8.1"
6377source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
6378dependencies = [
6379 "merlin",
6380 "parity-scale-codec",
6381 "sp-api",
6382 "sp-application-crypto",
6383 "sp-consensus",
6384 "sp-consensus-slots",
6385 "sp-consensus-vrf",
6386 "sp-core",
6387 "sp-inherents",
6388 "sp-keystore",
6389 "sp-runtime",
6390 "sp-std",
6391 "sp-timestamp",
6392]
6393
6394[[package]]
6395name = "sp-consensus-slots"
6396version = "0.8.1"
6397source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
6398dependencies = [
6399 "parity-scale-codec",
6400 "sp-runtime",
6401]
6402
6403[[package]]
6404name = "sp-consensus-vrf"
6405version = "0.8.1"
6406source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
6407dependencies = [
6408 "parity-scale-codec",
6409 "schnorrkel",
6410 "sp-core",
6411 "sp-runtime",
6412 "sp-std",
6413]
6414
6415[[package]]
5348name = "sp-core"6416name = "sp-core"
5349version = "2.0.0-rc4"6417version = "2.0.1"
5350source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6418source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5351dependencies = [6419dependencies = [
5352 "base58",6420 "base58",
5353 "blake2-rfc",6421 "blake2-rfc",
5354 "byteorder",6422 "byteorder",
5355 "derive_more",6423 "dyn-clonable",
5356 "ed25519-dalek",6424 "ed25519-dalek",
5357 "futures 0.3.5",6425 "futures 0.3.12",
5358 "hash-db",6426 "hash-db",
5359 "hash256-std-hasher",6427 "hash256-std-hasher",
5360 "hex",6428 "hex",
5361 "impl-serde 0.3.1",6429 "impl-serde",
5362 "lazy_static",6430 "lazy_static",
5363 "libsecp256k1",6431 "libsecp256k1",
5364 "log",6432 "log",
5365 "merlin",6433 "merlin",
5366 "num-traits 0.2.12",6434 "num-traits",
5367 "parity-scale-codec",6435 "parity-scale-codec",
5368 "parity-util-mem",6436 "parity-util-mem",
5369 "parking_lot 0.10.2",6437 "parking_lot 0.11.1",
5370 "primitive-types",6438 "primitive-types",
5371 "rand 0.7.3",6439 "rand 0.7.3",
5372 "regex",6440 "regex",
5373 "schnorrkel",6441 "schnorrkel",
6442 "secrecy",
5374 "serde",6443 "serde",
5375 "sha2 0.8.2",6444 "sha2 0.9.3",
5376 "sp-debug-derive",6445 "sp-debug-derive",
5377 "sp-externalities",6446 "sp-externalities",
5378 "sp-runtime-interface",6447 "sp-runtime-interface",
5379 "sp-std",6448 "sp-std",
5380 "sp-storage",6449 "sp-storage",
5381 "substrate-bip39",6450 "substrate-bip39",
6451 "thiserror",
5382 "tiny-bip39",6452 "tiny-bip39",
5383 "tiny-keccak",6453 "tiny-keccak",
5384 "twox-hash",6454 "twox-hash",
53886458
5389[[package]]6459[[package]]
5390name = "sp-database"6460name = "sp-database"
5391version = "2.0.0-rc4"6461version = "2.0.1"
5392source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6462source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5393dependencies = [6463dependencies = [
5394 "kvdb",6464 "kvdb",
5395 "parking_lot 0.10.2",6465 "parking_lot 0.11.1",
5396]6466]
53976467
5398[[package]]6468[[package]]
5399name = "sp-debug-derive"6469name = "sp-debug-derive"
5400version = "2.0.0-rc4"6470version = "2.0.1"
5401source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6471source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5402dependencies = [6472dependencies = [
5403 "proc-macro2",6473 "proc-macro2",
5404 "quote 1.0.7",6474 "quote",
5405 "syn 1.0.34",6475 "syn",
5406]6476]
54076477
5408[[package]]6478[[package]]
5409name = "sp-externalities"6479name = "sp-externalities"
5410version = "0.8.0-rc4"6480version = "0.8.1"
5411source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6481source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5412dependencies = [6482dependencies = [
5413 "environmental",6483 "environmental",
5414 "parity-scale-codec",6484 "parity-scale-codec",
54186488
5419[[package]]6489[[package]]
5420name = "sp-finality-grandpa"6490name = "sp-finality-grandpa"
5421version = "2.0.0-rc4"6491version = "2.0.1"
5422source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6492source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5423dependencies = [6493dependencies = [
5424 "finality-grandpa",6494 "finality-grandpa",
5425 "log",6495 "log",
5428 "sp-api",6498 "sp-api",
5429 "sp-application-crypto",6499 "sp-application-crypto",
5430 "sp-core",6500 "sp-core",
6501 "sp-keystore",
5431 "sp-runtime",6502 "sp-runtime",
5432 "sp-std",6503 "sp-std",
5433]6504]
54346505
5435[[package]]6506[[package]]
5436name = "sp-finality-tracker"
5437version = "2.0.0-rc4"
5438source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"
5439dependencies = [
5440 "parity-scale-codec",
5441 "sp-inherents",
5442 "sp-std",
5443]
5444
5445[[package]]
5446name = "sp-inherents"6507name = "sp-inherents"
5447version = "2.0.0-rc4"6508version = "2.0.1"
5448source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6509source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5449dependencies = [6510dependencies = [
5450 "derive_more",
5451 "parity-scale-codec",6511 "parity-scale-codec",
5452 "parking_lot 0.10.2",6512 "parking_lot 0.11.1",
5453 "sp-core",6513 "sp-core",
5454 "sp-std",6514 "sp-std",
6515 "thiserror",
5455]6516]
54566517
5457[[package]]6518[[package]]
5458name = "sp-io"6519name = "sp-io"
5459version = "2.0.0-rc4"6520version = "2.0.1"
5460source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6521source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5461dependencies = [6522dependencies = [
5462 "futures 0.3.5",6523 "futures 0.3.12",
5463 "hash-db",6524 "hash-db",
5464 "libsecp256k1",6525 "libsecp256k1",
5465 "log",6526 "log",
5466 "parity-scale-codec",6527 "parity-scale-codec",
5467 "parking_lot 0.10.2",6528 "parking_lot 0.11.1",
5468 "sp-core",6529 "sp-core",
5469 "sp-externalities",6530 "sp-externalities",
6531 "sp-keystore",
5470 "sp-runtime-interface",6532 "sp-runtime-interface",
5471 "sp-state-machine",6533 "sp-state-machine",
5472 "sp-std",6534 "sp-std",
5473 "sp-tracing",6535 "sp-tracing",
5474 "sp-trie",6536 "sp-trie",
5475 "sp-wasm-interface",6537 "sp-wasm-interface",
6538 "tracing",
6539 "tracing-core",
5476]6540]
54776541
5478[[package]]6542[[package]]
5479name = "sp-keyring"6543name = "sp-keyring"
5480version = "2.0.0-rc4"6544version = "2.0.1"
5481source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6545source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5482dependencies = [6546dependencies = [
5483 "lazy_static",6547 "lazy_static",
5484 "sp-core",6548 "sp-core",
5487]6551]
54886552
5489[[package]]6553[[package]]
6554name = "sp-keystore"
6555version = "0.8.0"
6556source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
6557dependencies = [
6558 "async-trait",
6559 "derive_more",
6560 "futures 0.3.12",
6561 "merlin",
6562 "parity-scale-codec",
6563 "parking_lot 0.11.1",
6564 "schnorrkel",
6565 "serde",
6566 "sp-core",
6567 "sp-externalities",
6568]
6569
6570[[package]]
5490name = "sp-offchain"6571name = "sp-offchain"
5491version = "2.0.0-rc4"6572version = "2.0.1"
5492source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6573source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5493dependencies = [6574dependencies = [
5494 "sp-api",6575 "sp-api",
5495 "sp-core",6576 "sp-core",
54986579
5499[[package]]6580[[package]]
5500name = "sp-panic-handler"6581name = "sp-panic-handler"
5501version = "2.0.0-rc4"6582version = "2.0.1"
5502source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6583source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5503dependencies = [6584dependencies = [
5504 "backtrace",6585 "backtrace",
5505 "log",
5506]6586]
55076587
5508[[package]]6588[[package]]
5509name = "sp-rpc"6589name = "sp-rpc"
5510version = "2.0.0-rc4"6590version = "2.0.1"
5511source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6591source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5512dependencies = [6592dependencies = [
5513 "serde",6593 "serde",
5514 "sp-core",6594 "sp-core",
5515]6595]
55166596
5517[[package]]6597[[package]]
5518name = "sp-runtime"6598name = "sp-runtime"
5519version = "2.0.0-rc4"6599version = "2.0.1"
5520source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6600source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5521dependencies = [6601dependencies = [
5522 "either",6602 "either",
5523 "hash256-std-hasher",6603 "hash256-std-hasher",
5524 "impl-trait-for-tuples",6604 "impl-trait-for-tuples 0.2.1",
5525 "log",6605 "log",
5526 "parity-scale-codec",6606 "parity-scale-codec",
5527 "parity-util-mem",6607 "parity-util-mem",
5531 "sp-application-crypto",6611 "sp-application-crypto",
5532 "sp-arithmetic",6612 "sp-arithmetic",
5533 "sp-core",6613 "sp-core",
5534 "sp-inherents",
5535 "sp-io",6614 "sp-io",
5536 "sp-std",6615 "sp-std",
5537]6616]
55386617
5539[[package]]6618[[package]]
5540name = "sp-runtime-interface"6619name = "sp-runtime-interface"
5541version = "2.0.0-rc4"6620version = "2.0.1"
5542source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6621source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5543dependencies = [6622dependencies = [
6623 "impl-trait-for-tuples 0.2.1",
5544 "parity-scale-codec",6624 "parity-scale-codec",
5545 "primitive-types",6625 "primitive-types",
5546 "sp-externalities",6626 "sp-externalities",
5547 "sp-runtime-interface-proc-macro",6627 "sp-runtime-interface-proc-macro",
5548 "sp-std",6628 "sp-std",
6629 "sp-storage",
5549 "sp-tracing",6630 "sp-tracing",
5550 "sp-wasm-interface",6631 "sp-wasm-interface",
5551 "static_assertions",6632 "static_assertions",
5552]6633]
55536634
5554[[package]]6635[[package]]
5555name = "sp-runtime-interface-proc-macro"6636name = "sp-runtime-interface-proc-macro"
5556version = "2.0.0-rc4"6637version = "2.0.1"
5557source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6638source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5558dependencies = [6639dependencies = [
5559 "Inflector",6640 "Inflector",
5560 "proc-macro-crate",6641 "proc-macro-crate",
5561 "proc-macro2",6642 "proc-macro2",
5562 "quote 1.0.7",6643 "quote",
5563 "syn 1.0.34",6644 "syn",
5564]6645]
55656646
5566[[package]]6647[[package]]
5567name = "sp-sandbox"6648name = "sp-sandbox"
5568version = "0.8.0-rc4"6649version = "0.8.1"
5569source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6650source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5570dependencies = [6651dependencies = [
5571 "parity-scale-codec",6652 "parity-scale-codec",
5572 "sp-core",6653 "sp-core",
55786659
5579[[package]]6660[[package]]
5580name = "sp-serializer"6661name = "sp-serializer"
5581version = "2.0.0-rc4"6662version = "2.0.1"
5582source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6663source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5583dependencies = [6664dependencies = [
5584 "serde",6665 "serde",
5585 "serde_json",6666 "serde_json",
5586]6667]
55876668
5588[[package]]6669[[package]]
5589name = "sp-session"6670name = "sp-session"
5590version = "2.0.0-rc4"6671version = "2.0.1"
5591source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6672source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5592dependencies = [6673dependencies = [
5593 "parity-scale-codec",6674 "parity-scale-codec",
5594 "sp-api",6675 "sp-api",
56006681
5601[[package]]6682[[package]]
5602name = "sp-staking"6683name = "sp-staking"
5603version = "2.0.0-rc4"6684version = "2.0.1"
5604source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6685source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5605dependencies = [6686dependencies = [
5606 "parity-scale-codec",6687 "parity-scale-codec",
5607 "sp-runtime",6688 "sp-runtime",
56106691
5611[[package]]6692[[package]]
5612name = "sp-state-machine"6693name = "sp-state-machine"
5613version = "0.8.0-rc4"6694version = "0.8.1"
5614source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6695source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5615dependencies = [6696dependencies = [
5616 "hash-db",6697 "hash-db",
5617 "itertools 0.9.0",
5618 "log",6698 "log",
5619 "num-traits 0.2.12",6699 "num-traits",
5620 "parity-scale-codec",6700 "parity-scale-codec",
5621 "parking_lot 0.10.2",6701 "parking_lot 0.11.1",
5622 "rand 0.7.3",6702 "rand 0.7.3",
5623 "smallvec 1.4.1",6703 "smallvec 1.6.1",
5624 "sp-core",6704 "sp-core",
5625 "sp-externalities",6705 "sp-externalities",
5626 "sp-panic-handler",6706 "sp-panic-handler",
6707 "sp-std",
5627 "sp-trie",6708 "sp-trie",
6709 "thiserror",
5628 "trie-db",6710 "trie-db",
5629 "trie-root",6711 "trie-root",
5630]6712]
56316713
5632[[package]]6714[[package]]
5633name = "sp-std"6715name = "sp-std"
5634version = "2.0.0-rc4"6716version = "2.0.1"
5635source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6717source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
56366718
5637[[package]]6719[[package]]
5638name = "sp-storage"6720name = "sp-storage"
5639version = "2.0.0-rc4"6721version = "2.0.1"
5640source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6722source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5641dependencies = [6723dependencies = [
5642 "impl-serde 0.2.3",6724 "impl-serde",
6725 "parity-scale-codec",
5643 "ref-cast",6726 "ref-cast",
5644 "serde",6727 "serde",
5645 "sp-debug-derive",6728 "sp-debug-derive",
5646 "sp-std",6729 "sp-std",
5647]6730]
56486731
5649[[package]]6732[[package]]
6733name = "sp-tasks"
6734version = "2.0.0"
6735source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
6736dependencies = [
6737 "log",
6738 "sp-core",
6739 "sp-externalities",
6740 "sp-io",
6741 "sp-runtime-interface",
6742 "sp-std",
6743]
6744
6745[[package]]
5650name = "sp-timestamp"6746name = "sp-timestamp"
5651version = "2.0.0-rc4"6747version = "2.0.1"
5652source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6748source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5653dependencies = [6749dependencies = [
5654 "impl-trait-for-tuples",6750 "impl-trait-for-tuples 0.2.1",
5655 "parity-scale-codec",6751 "parity-scale-codec",
5656 "sp-api",6752 "sp-api",
5657 "sp-inherents",6753 "sp-inherents",
56626758
5663[[package]]6759[[package]]
5664name = "sp-tracing"6760name = "sp-tracing"
5665version = "2.0.0-rc4"6761version = "2.0.1"
5666source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6762source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5667dependencies = [6763dependencies = [
5668 "log",6764 "log",
5669 "rental",6765 "parity-scale-codec",
6766 "sp-std",
5670 "tracing",6767 "tracing",
6768 "tracing-core",
6769 "tracing-subscriber",
5671]6770]
56726771
5673[[package]]6772[[package]]
5674name = "sp-transaction-pool"6773name = "sp-transaction-pool"
5675version = "2.0.0-rc4"6774version = "2.0.1"
5676source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6775source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5677dependencies = [6776dependencies = [
5678 "derive_more",6777 "derive_more",
5679 "futures 0.3.5",6778 "futures 0.3.12",
5680 "log",6779 "log",
5681 "parity-scale-codec",6780 "parity-scale-codec",
5682 "serde",6781 "serde",
5683 "sp-api",6782 "sp-api",
5684 "sp-blockchain",6783 "sp-blockchain",
5685 "sp-runtime",6784 "sp-runtime",
5686 "sp-utils",6785 "thiserror",
5687]6786]
56886787
5689[[package]]6788[[package]]
5690name = "sp-trie"6789name = "sp-trie"
5691version = "2.0.0-rc4"6790version = "2.0.1"
5692source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6791source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5693dependencies = [6792dependencies = [
5694 "hash-db",6793 "hash-db",
5695 "memory-db",6794 "memory-db",
57026801
5703[[package]]6802[[package]]
5704name = "sp-utils"6803name = "sp-utils"
5705version = "2.0.0-rc4"6804version = "2.0.1"
5706source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6805source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5707dependencies = [6806dependencies = [
5708 "futures 0.3.5",6807 "futures 0.3.12",
5709 "futures-core",6808 "futures-core",
5710 "futures-timer 3.0.2",6809 "futures-timer 3.0.2",
5711 "lazy_static",6810 "lazy_static",
57146813
5715[[package]]6814[[package]]
5716name = "sp-version"6815name = "sp-version"
5717version = "2.0.0-rc4"6816version = "2.0.1"
5718source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6817source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5719dependencies = [6818dependencies = [
5720 "impl-serde 0.2.3",6819 "impl-serde",
5721 "parity-scale-codec",6820 "parity-scale-codec",
5722 "serde",6821 "serde",
5723 "sp-runtime",6822 "sp-runtime",
57266825
5727[[package]]6826[[package]]
5728name = "sp-wasm-interface"6827name = "sp-wasm-interface"
5729version = "2.0.0-rc4"6828version = "2.0.1"
5730source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6829source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5731dependencies = [6830dependencies = [
5732 "impl-trait-for-tuples",6831 "impl-trait-for-tuples 0.2.1",
5733 "parity-scale-codec",6832 "parity-scale-codec",
5734 "sp-std",6833 "sp-std",
5735 "wasmi",6834 "wasmi",
57556854
5756[[package]]6855[[package]]
5757name = "statrs"6856name = "statrs"
5758version = "0.10.0"6857version = "0.12.0"
5759source = "registry+https://github.com/rust-lang/crates.io-index"6858source = "registry+https://github.com/rust-lang/crates.io-index"
5760checksum = "10102ac8d55e35db2b3fafc26f81ba8647da2e15879ab686a67e6d19af2685e8"6859checksum = "cce16f6de653e88beca7bd13780d08e09d4489dbca1f9210e041bc4852481382"
5761dependencies = [6860dependencies = [
5762 "rand 0.5.6",6861 "rand 0.7.3",
5763]6862]
57646863
5765[[package]]6864[[package]]
5766name = "stream-cipher"6865name = "stream-cipher"
5767version = "0.4.1"6866version = "0.7.1"
5768source = "registry+https://github.com/rust-lang/crates.io-index"6867source = "registry+https://github.com/rust-lang/crates.io-index"
5769checksum = "09f8ed9974042b8c3672ff3030a69fcc03b74c47c3d1ecb7755e8a3626011e88"6868checksum = "c80e15f898d8d8f25db24c253ea615cc14acf418ff307822995814e7d42cfa89"
5770dependencies = [6869dependencies = [
5771 "generic-array 0.14.3",6870 "block-cipher",
6871 "generic-array 0.14.4",
5772]6872]
57736873
5774[[package]]6874[[package]]
57886888
5789[[package]]6889[[package]]
5790name = "structopt"6890name = "structopt"
5791version = "0.3.15"6891version = "0.3.21"
5792source = "registry+https://github.com/rust-lang/crates.io-index"6892source = "registry+https://github.com/rust-lang/crates.io-index"
5793checksum = "de2f5e239ee807089b62adce73e48c625e0ed80df02c7ab3f068f5db5281065c"6893checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c"
5794dependencies = [6894dependencies = [
5795 "clap",6895 "clap",
5796 "lazy_static",6896 "lazy_static",
57996899
5800[[package]]6900[[package]]
5801name = "structopt-derive"6901name = "structopt-derive"
5802version = "0.4.8"6902version = "0.4.14"
5803source = "registry+https://github.com/rust-lang/crates.io-index"6903source = "registry+https://github.com/rust-lang/crates.io-index"
5804checksum = "510413f9de616762a4fbeab62509bf15c729603b72d7cd71280fbca431b1c118"6904checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90"
5805dependencies = [6905dependencies = [
5806 "heck",6906 "heck",
5807 "proc-macro-error",6907 "proc-macro-error",
5808 "proc-macro2",6908 "proc-macro2",
5809 "quote 1.0.7",6909 "quote",
5810 "syn 1.0.34",6910 "syn",
5811]6911]
58126912
5813[[package]]6913[[package]]
5827dependencies = [6927dependencies = [
5828 "heck",6928 "heck",
5829 "proc-macro2",6929 "proc-macro2",
5830 "quote 1.0.7",6930 "quote",
5831 "syn 1.0.34",6931 "syn",
5832]6932]
58336933
5834[[package]]6934[[package]]
5835name = "substrate-bip39"6935name = "substrate-bip39"
5836version = "0.4.1"6936version = "0.4.2"
5837source = "registry+https://github.com/rust-lang/crates.io-index"6937source = "registry+https://github.com/rust-lang/crates.io-index"
5838checksum = "c004e8166d6e0aa3a9d5fa673e5b7098ff25f930de1013a21341988151e681bb"6938checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236"
5839dependencies = [6939dependencies = [
5840 "hmac",6940 "hmac 0.7.1",
5841 "pbkdf2",6941 "pbkdf2 0.3.0",
5842 "schnorrkel",6942 "schnorrkel",
5843 "sha2 0.8.2",6943 "sha2 0.8.2",
6944 "zeroize",
5844]6945]
58456946
5846[[package]]6947[[package]]
5847name = "substrate-build-script-utils"6948name = "substrate-build-script-utils"
5848version = "2.0.0-rc4"6949version = "2.0.1"
5849source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6950source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5850dependencies = [6951dependencies = [
5851 "platforms",6952 "platforms",
5852]6953]
58536954
5854[[package]]6955[[package]]
6956name = "substrate-frame-rpc-system"
6957version = "2.0.1"
6958source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
6959dependencies = [
6960 "frame-system-rpc-runtime-api",
6961 "futures 0.3.12",
6962 "jsonrpc-core",
6963 "jsonrpc-core-client",
6964 "jsonrpc-derive",
6965 "log",
6966 "parity-scale-codec",
6967 "sc-client-api",
6968 "sc-rpc-api",
6969 "serde",
6970 "sp-api",
6971 "sp-block-builder",
6972 "sp-blockchain",
6973 "sp-core",
6974 "sp-runtime",
6975 "sp-transaction-pool",
6976]
6977
6978[[package]]
5855name = "substrate-prometheus-endpoint"6979name = "substrate-prometheus-endpoint"
5856version = "0.8.0-rc4"6980version = "0.8.1"
5857source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6981source = "git+https://github.com/usetech-llc/substrate.git?branch=unique#0e070672cf7a7bec72fb3f26188915cfb43c440f"
5858dependencies = [6982dependencies = [
5859 "async-std",6983 "async-std",
5860 "derive_more",6984 "derive_more",
5861 "futures-util",6985 "futures-util",
5862 "hyper 0.13.7",6986 "hyper 0.13.10",
5863 "log",6987 "log",
5864 "prometheus",6988 "prometheus",
5865 "tokio 0.2.21",6989 "tokio 0.2.25",
5866]6990]
58676991
5868[[package]]6992[[package]]
5869name = "substrate-wasm-builder-runner"6993name = "substrate-wasm-builder-runner"
5870version = "1.0.6"6994version = "1.0.6"
5871source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6995source = "registry+https://github.com/rust-lang/crates.io-index"
6996checksum = "d2a965994514ab35d3893e9260245f2947fd1981cdd4fffd2c6e6d1a9ce02e6a"
58726997
5873[[package]]6998[[package]]
5874name = "subtle"6999name = "subtle"
58787003
5879[[package]]7004[[package]]
5880name = "subtle"7005name = "subtle"
5881version = "2.2.3"7006version = "2.4.0"
5882source = "registry+https://github.com/rust-lang/crates.io-index"7007source = "registry+https://github.com/rust-lang/crates.io-index"
5883checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1"7008checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2"
58847009
5885[[package]]7010[[package]]
5886name = "syn"7011name = "syn"
5887version = "0.11.11"7012version = "1.0.60"
5888source = "registry+https://github.com/rust-lang/crates.io-index"7013source = "registry+https://github.com/rust-lang/crates.io-index"
5889checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"7014checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081"
5890dependencies = [7015dependencies = [
5891 "quote 0.3.15",
5892 "synom",
5893 "unicode-xid 0.0.4",
5894]
5895
5896[[package]]
5897name = "syn"
5898version = "1.0.34"
5899source = "registry+https://github.com/rust-lang/crates.io-index"
5900checksum = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b"
5901dependencies = [
5902 "proc-macro2",7016 "proc-macro2",
5903 "quote 1.0.7",7017 "quote",
5904 "unicode-xid 0.2.1",7018 "unicode-xid",
5905]7019]
59067020
5907[[package]]7021[[package]]
5908name = "syn-mid"
5909version = "0.5.0"
5910source = "registry+https://github.com/rust-lang/crates.io-index"
5911checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a"
5912dependencies = [
5913 "proc-macro2",
5914 "quote 1.0.7",
5915 "syn 1.0.34",
5916]
5917
5918[[package]]
5919name = "synom"
5920version = "0.11.3"
5921source = "registry+https://github.com/rust-lang/crates.io-index"
5922checksum = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
5923dependencies = [
5924 "unicode-xid 0.0.4",
5925]
5926
5927[[package]]
5928name = "synstructure"7022name = "synstructure"
5929version = "0.12.4"7023version = "0.12.4"
5930source = "registry+https://github.com/rust-lang/crates.io-index"7024source = "registry+https://github.com/rust-lang/crates.io-index"
5931checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"7025checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
5932dependencies = [7026dependencies = [
5933 "proc-macro2",7027 "proc-macro2",
5934 "quote 1.0.7",7028 "quote",
5935 "syn 1.0.34",7029 "syn",
5936 "unicode-xid 0.2.1",7030 "unicode-xid",
5937]7031]
59387032
5939[[package]]7033[[package]]
5940name = "sysinfo"
5941version = "0.13.4"
5942source = "registry+https://github.com/rust-lang/crates.io-index"
5943checksum = "1cac193374347e7c263c5f547524f36ff8ec6702d56c8799c8331d26dffe8c1e"
5944dependencies = [
5945 "cfg-if",
5946 "doc-comment",
5947 "libc",
5948 "ntapi",
5949 "once_cell",
5950 "rayon",
5951 "winapi 0.3.9",
5952]
5953
5954[[package]]
5955name = "take_mut"7034name = "take_mut"
5956version = "0.2.2"7035version = "0.2.2"
5957source = "registry+https://github.com/rust-lang/crates.io-index"7036source = "registry+https://github.com/rust-lang/crates.io-index"
5958checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60"7037checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60"
59597038
5960[[package]]7039[[package]]
7040name = "target-lexicon"
7041version = "0.10.0"
7042source = "registry+https://github.com/rust-lang/crates.io-index"
7043checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d"
7044
7045[[package]]
5961name = "tempfile"7046name = "tempfile"
5962version = "3.1.0"7047version = "3.2.0"
5963source = "registry+https://github.com/rust-lang/crates.io-index"7048source = "registry+https://github.com/rust-lang/crates.io-index"
5964checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"7049checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
5965dependencies = [7050dependencies = [
5966 "cfg-if",7051 "cfg-if 1.0.0",
5967 "libc",7052 "libc",
5968 "rand 0.7.3",7053 "rand 0.8.3",
5969 "redox_syscall",7054 "redox_syscall 0.2.5",
5970 "remove_dir_all",7055 "remove_dir_all",
5971 "winapi 0.3.9",7056 "winapi 0.3.9",
5972]7057]
59737058
5974[[package]]7059[[package]]
5975name = "termcolor"7060name = "termcolor"
5976version = "1.1.0"7061version = "1.1.2"
5977source = "registry+https://github.com/rust-lang/crates.io-index"7062source = "registry+https://github.com/rust-lang/crates.io-index"
5978checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"7063checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
5979dependencies = [7064dependencies = [
5980 "winapi-util",7065 "winapi-util",
5981]7066]
59917076
5992[[package]]7077[[package]]
5993name = "thiserror"7078name = "thiserror"
5994version = "1.0.20"7079version = "1.0.23"
5995source = "registry+https://github.com/rust-lang/crates.io-index"7080source = "registry+https://github.com/rust-lang/crates.io-index"
5996checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08"7081checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146"
5997dependencies = [7082dependencies = [
5998 "thiserror-impl",7083 "thiserror-impl",
5999]7084]
60007085
6001[[package]]7086[[package]]
6002name = "thiserror-impl"7087name = "thiserror-impl"
6003version = "1.0.20"7088version = "1.0.23"
6004source = "registry+https://github.com/rust-lang/crates.io-index"7089source = "registry+https://github.com/rust-lang/crates.io-index"
6005checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793"7090checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1"
6006dependencies = [7091dependencies = [
6007 "proc-macro2",7092 "proc-macro2",
6008 "quote 1.0.7",7093 "quote",
6009 "syn 1.0.34",7094 "syn",
6010]7095]
60117096
6012[[package]]7097[[package]]
6013name = "thread_local"7098name = "thread_local"
6014version = "1.0.1"7099version = "1.1.3"
6015source = "registry+https://github.com/rust-lang/crates.io-index"7100source = "registry+https://github.com/rust-lang/crates.io-index"
6016checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"7101checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd"
6017dependencies = [7102dependencies = [
6018 "lazy_static",7103 "once_cell",
6019]7104]
60207105
6021[[package]]7106[[package]]
60297114
6030[[package]]7115[[package]]
6031name = "time"7116name = "time"
6032version = "0.1.43"7117version = "0.1.44"
6033source = "registry+https://github.com/rust-lang/crates.io-index"7118source = "registry+https://github.com/rust-lang/crates.io-index"
6034checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"7119checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
6035dependencies = [7120dependencies = [
6036 "libc",7121 "libc",
7122 "wasi 0.10.0+wasi-snapshot-preview1",
6037 "winapi 0.3.9",7123 "winapi 0.3.9",
6038]7124]
60397125
6040[[package]]7126[[package]]
6041name = "tiny-bip39"7127name = "tiny-bip39"
6042version = "0.7.3"7128version = "0.8.0"
6043source = "registry+https://github.com/rust-lang/crates.io-index"7129source = "registry+https://github.com/rust-lang/crates.io-index"
6044checksum = "b0165e045cc2ae1660270ca65e1676dbaab60feb0f91b10f7d0665e9b47e31f2"7130checksum = "d9e44c4759bae7f1032e286a7ef990bd9ed23fe831b7eeba0beb97484c2e59b8"
6045dependencies = [7131dependencies = [
6046 "failure",7132 "anyhow",
6047 "hmac",7133 "hmac 0.8.1",
6048 "once_cell",7134 "once_cell",
6049 "pbkdf2",7135 "pbkdf2 0.4.0",
6050 "rand 0.7.3",7136 "rand 0.7.3",
6051 "rustc-hash",7137 "rustc-hash",
6052 "sha2 0.8.2",7138 "sha2 0.9.3",
7139 "thiserror",
6053 "unicode-normalization",7140 "unicode-normalization",
7141 "zeroize",
6054]7142]
60557143
6056[[package]]7144[[package]]
60647152
6065[[package]]7153[[package]]
6066name = "tinyvec"7154name = "tinyvec"
6067version = "0.3.3"7155version = "1.1.1"
6068source = "registry+https://github.com/rust-lang/crates.io-index"7156source = "registry+https://github.com/rust-lang/crates.io-index"
6069checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed"7157checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023"
7158dependencies = [
7159 "tinyvec_macros",
7160]
60707161
6071[[package]]7162[[package]]
7163name = "tinyvec_macros"
7164version = "0.1.0"
7165source = "registry+https://github.com/rust-lang/crates.io-index"
7166checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
7167
7168[[package]]
6072name = "tokio"7169name = "tokio"
6073version = "0.1.22"7170version = "0.1.22"
6074source = "registry+https://github.com/rust-lang/crates.io-index"7171source = "registry+https://github.com/rust-lang/crates.io-index"
6075checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6"7172checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6"
6076dependencies = [7173dependencies = [
6077 "bytes 0.4.12",7174 "bytes 0.4.12",
6078 "futures 0.1.29",7175 "futures 0.1.30",
6079 "mio",7176 "mio",
6080 "num_cpus",7177 "num_cpus",
6081 "tokio-codec",7178 "tokio-codec",
6082 "tokio-current-thread",7179 "tokio-current-thread",
6083 "tokio-executor 0.1.10",7180 "tokio-executor",
6084 "tokio-fs",7181 "tokio-fs",
6085 "tokio-io",7182 "tokio-io",
6086 "tokio-reactor",7183 "tokio-reactor",
6087 "tokio-sync 0.1.8",7184 "tokio-sync",
6088 "tokio-tcp",7185 "tokio-tcp",
6089 "tokio-threadpool",7186 "tokio-threadpool",
6090 "tokio-timer",7187 "tokio-timer",
60947191
6095[[package]]7192[[package]]
6096name = "tokio"7193name = "tokio"
6097version = "0.2.21"7194version = "0.2.25"
6098source = "registry+https://github.com/rust-lang/crates.io-index"7195source = "registry+https://github.com/rust-lang/crates.io-index"
6099checksum = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58"7196checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092"
6100dependencies = [7197dependencies = [
6101 "bytes 0.5.6",7198 "bytes 0.5.6",
6102 "fnv",7199 "fnv",
6108 "mio",7205 "mio",
6109 "mio-uds",7206 "mio-uds",
6110 "num_cpus",7207 "num_cpus",
6111 "pin-project-lite",7208 "pin-project-lite 0.1.11",
6112 "signal-hook-registry",7209 "signal-hook-registry",
6113 "slab",7210 "slab",
6114 "winapi 0.3.9",7211 "winapi 0.3.9",
6122dependencies = [7219dependencies = [
6123 "bytes 0.4.12",7220 "bytes 0.4.12",
6124 "either",7221 "either",
6125 "futures 0.1.29",7222 "futures 0.1.30",
6126]7223]
61277224
6128[[package]]7225[[package]]
6132checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b"7229checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b"
6133dependencies = [7230dependencies = [
6134 "bytes 0.4.12",7231 "bytes 0.4.12",
6135 "futures 0.1.29",7232 "futures 0.1.30",
6136 "tokio-io",7233 "tokio-io",
6137]7234]
61387235
6142source = "registry+https://github.com/rust-lang/crates.io-index"7239source = "registry+https://github.com/rust-lang/crates.io-index"
6143checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e"7240checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e"
6144dependencies = [7241dependencies = [
6145 "futures 0.1.29",7242 "futures 0.1.30",
6146 "tokio-executor 0.1.10",7243 "tokio-executor",
6147]7244]
61487245
6149[[package]]7246[[package]]
6152source = "registry+https://github.com/rust-lang/crates.io-index"7249source = "registry+https://github.com/rust-lang/crates.io-index"
6153checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671"7250checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671"
6154dependencies = [7251dependencies = [
6155 "crossbeam-utils",7252 "crossbeam-utils 0.7.2",
6156 "futures 0.1.29",7253 "futures 0.1.30",
6157]7254]
61587255
6159[[package]]7256[[package]]
6160name = "tokio-executor"
6161version = "0.2.0-alpha.6"
6162source = "registry+https://github.com/rust-lang/crates.io-index"
6163checksum = "9ee9ceecf69145923834ea73f32ba40c790fd877b74a7817dd0b089f1eb9c7c8"
6164dependencies = [
6165 "futures-util-preview",
6166 "lazy_static",
6167 "tokio-sync 0.2.0-alpha.6",
6168]
6169
6170[[package]]
6171name = "tokio-fs"7257name = "tokio-fs"
6172version = "0.1.7"7258version = "0.1.7"
6173source = "registry+https://github.com/rust-lang/crates.io-index"7259source = "registry+https://github.com/rust-lang/crates.io-index"
6174checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4"7260checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4"
6175dependencies = [7261dependencies = [
6176 "futures 0.1.29",7262 "futures 0.1.30",
6177 "tokio-io",7263 "tokio-io",
6178 "tokio-threadpool",7264 "tokio-threadpool",
6179]7265]
6185checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674"7271checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674"
6186dependencies = [7272dependencies = [
6187 "bytes 0.4.12",7273 "bytes 0.4.12",
6188 "futures 0.1.29",7274 "futures 0.1.30",
6189 "log",7275 "log",
6190]7276]
61917277
6196checksum = "9d282d483052288b2308ba5ee795f5673b159c9bdf63c385a05609da782a5eae"7282checksum = "9d282d483052288b2308ba5ee795f5673b159c9bdf63c385a05609da782a5eae"
6197dependencies = [7283dependencies = [
6198 "bytes 0.4.12",7284 "bytes 0.4.12",
6199 "futures 0.1.29",7285 "futures 0.1.30",
6200 "mio",7286 "mio",
6201 "mio-named-pipes",7287 "mio-named-pipes",
6202 "tokio 0.1.22",7288 "tokio 0.1.22",
6208source = "registry+https://github.com/rust-lang/crates.io-index"7294source = "registry+https://github.com/rust-lang/crates.io-index"
6209checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351"7295checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351"
6210dependencies = [7296dependencies = [
6211 "crossbeam-utils",7297 "crossbeam-utils 0.7.2",
6212 "futures 0.1.29",7298 "futures 0.1.30",
6213 "lazy_static",7299 "lazy_static",
6214 "log",7300 "log",
6215 "mio",7301 "mio",
6216 "num_cpus",7302 "num_cpus",
6217 "parking_lot 0.9.0",7303 "parking_lot 0.9.0",
6218 "slab",7304 "slab",
6219 "tokio-executor 0.1.10",7305 "tokio-executor",
6220 "tokio-io",7306 "tokio-io",
6221 "tokio-sync 0.1.8",7307 "tokio-sync",
6222]7308]
62237309
6224[[package]]7310[[package]]
6225name = "tokio-rustls"7311name = "tokio-rustls"
6226version = "0.13.1"7312version = "0.14.1"
6227source = "registry+https://github.com/rust-lang/crates.io-index"7313source = "registry+https://github.com/rust-lang/crates.io-index"
6228checksum = "15cb62a0d2770787abc96e99c1cd98fcf17f94959f3af63ca85bdfb203f051b4"7314checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a"
6229dependencies = [7315dependencies = [
6230 "futures-core",7316 "futures-core",
6231 "rustls",7317 "rustls 0.18.1",
6232 "tokio 0.2.21",7318 "tokio 0.2.25",
6233 "webpki",7319 "webpki",
6234]7320]
62357321
6239source = "registry+https://github.com/rust-lang/crates.io-index"7325source = "registry+https://github.com/rust-lang/crates.io-index"
6240checksum = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162"7326checksum = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162"
6241dependencies = [7327dependencies = [
6242 "futures 0.1.29",7328 "futures 0.1.30",
6243]7329]
62447330
6245[[package]]7331[[package]]
6249checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee"7335checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee"
6250dependencies = [7336dependencies = [
6251 "fnv",7337 "fnv",
6252 "futures 0.1.29",7338 "futures 0.1.30",
6253]7339]
62547340
6255[[package]]7341[[package]]
6256name = "tokio-sync"
6257version = "0.2.0-alpha.6"
6258source = "registry+https://github.com/rust-lang/crates.io-index"
6259checksum = "4f1aaeb685540f7407ea0e27f1c9757d258c7c6bf4e3eb19da6fc59b747239d2"
6260dependencies = [
6261 "fnv",
6262 "futures-core-preview",
6263 "futures-util-preview",
6264]
6265
6266[[package]]
6267name = "tokio-tcp"7342name = "tokio-tcp"
6268version = "0.1.4"7343version = "0.1.4"
6269source = "registry+https://github.com/rust-lang/crates.io-index"7344source = "registry+https://github.com/rust-lang/crates.io-index"
6270checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72"7345checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72"
6271dependencies = [7346dependencies = [
6272 "bytes 0.4.12",7347 "bytes 0.4.12",
6273 "futures 0.1.29",7348 "futures 0.1.30",
6274 "iovec",7349 "iovec",
6275 "mio",7350 "mio",
6276 "tokio-io",7351 "tokio-io",
6283source = "registry+https://github.com/rust-lang/crates.io-index"7358source = "registry+https://github.com/rust-lang/crates.io-index"
6284checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89"7359checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89"
6285dependencies = [7360dependencies = [
6286 "crossbeam-deque",7361 "crossbeam-deque 0.7.3",
6287 "crossbeam-queue",7362 "crossbeam-queue",
6288 "crossbeam-utils",7363 "crossbeam-utils 0.7.2",
6289 "futures 0.1.29",7364 "futures 0.1.30",
6290 "lazy_static",7365 "lazy_static",
6291 "log",7366 "log",
6292 "num_cpus",7367 "num_cpus",
6293 "slab",7368 "slab",
6294 "tokio-executor 0.1.10",7369 "tokio-executor",
6295]7370]
62967371
6297[[package]]7372[[package]]
6300source = "registry+https://github.com/rust-lang/crates.io-index"7375source = "registry+https://github.com/rust-lang/crates.io-index"
6301checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296"7376checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296"
6302dependencies = [7377dependencies = [
6303 "crossbeam-utils",7378 "crossbeam-utils 0.7.2",
6304 "futures 0.1.29",7379 "futures 0.1.30",
6305 "slab",7380 "slab",
6306 "tokio-executor 0.1.10",7381 "tokio-executor",
6307]7382]
63087383
6309[[package]]7384[[package]]
6313checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"7388checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"
6314dependencies = [7389dependencies = [
6315 "bytes 0.4.12",7390 "bytes 0.4.12",
6316 "futures 0.1.29",7391 "futures 0.1.30",
6317 "log",7392 "log",
6318 "mio",7393 "mio",
6319 "tokio-codec",7394 "tokio-codec",
6328checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0"7403checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0"
6329dependencies = [7404dependencies = [
6330 "bytes 0.4.12",7405 "bytes 0.4.12",
6331 "futures 0.1.29",7406 "futures 0.1.30",
6332 "iovec",7407 "iovec",
6333 "libc",7408 "libc",
6334 "log",7409 "log",
6349 "futures-core",7424 "futures-core",
6350 "futures-sink",7425 "futures-sink",
6351 "log",7426 "log",
6352 "pin-project-lite",7427 "pin-project-lite 0.1.11",
6353 "tokio 0.2.21",7428 "tokio 0.2.25",
6354]7429]
63557430
6356[[package]]7431[[package]]
6357name = "toml"7432name = "toml"
6358version = "0.5.6"7433version = "0.5.8"
6359source = "registry+https://github.com/rust-lang/crates.io-index"7434source = "registry+https://github.com/rust-lang/crates.io-index"
6360checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a"7435checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
6361dependencies = [7436dependencies = [
6362 "serde",7437 "serde",
6363]7438]
63647439
6365[[package]]7440[[package]]
6366name = "tower-service"7441name = "tower-service"
6367version = "0.3.0"7442version = "0.3.1"
6368source = "registry+https://github.com/rust-lang/crates.io-index"7443source = "registry+https://github.com/rust-lang/crates.io-index"
6369checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"7444checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
63707445
6371[[package]]7446[[package]]
6372name = "tracing"7447name = "tracing"
6373version = "0.1.16"7448version = "0.1.23"
6374source = "registry+https://github.com/rust-lang/crates.io-index"7449source = "registry+https://github.com/rust-lang/crates.io-index"
6375checksum = "c2e2a2de6b0d5cbb13fc21193a2296888eaab62b6044479aafb3c54c01c29fcd"7450checksum = "f7d40a22fd029e33300d8d89a5cc8ffce18bb7c587662f54629e94c9de5487f3"
6376dependencies = [7451dependencies = [
6377 "cfg-if",7452 "cfg-if 1.0.0",
6378 "log",7453 "log",
7454 "pin-project-lite 0.2.4",
6379 "tracing-attributes",7455 "tracing-attributes",
6380 "tracing-core",7456 "tracing-core",
6381]7457]
63827458
6383[[package]]7459[[package]]
6384name = "tracing-attributes"7460name = "tracing-attributes"
6385version = "0.1.9"7461version = "0.1.12"
6386source = "registry+https://github.com/rust-lang/crates.io-index"7462source = "registry+https://github.com/rust-lang/crates.io-index"
6387checksum = "f0693bf8d6f2bf22c690fc61a9d21ac69efdbb894a17ed596b9af0f01e64b84b"7463checksum = "43f080ea7e4107844ef4766459426fa2d5c1ada2e47edba05dc7fa99d9629f47"
6388dependencies = [7464dependencies = [
6389 "proc-macro2",7465 "proc-macro2",
6390 "quote 1.0.7",7466 "quote",
6391 "syn 1.0.34",7467 "syn",
6392]7468]
63937469
6394[[package]]7470[[package]]
6395name = "tracing-core"7471name = "tracing-core"
6396version = "0.1.11"7472version = "0.1.17"
6397source = "registry+https://github.com/rust-lang/crates.io-index"7473source = "registry+https://github.com/rust-lang/crates.io-index"
6398checksum = "94ae75f0d28ae10786f3b1895c55fe72e79928fd5ccdebb5438c75e93fec178f"7474checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f"
6399dependencies = [7475dependencies = [
6400 "lazy_static",7476 "lazy_static",
6401]7477]
64027478
6403[[package]]7479[[package]]
7480name = "tracing-futures"
7481version = "0.2.4"
7482source = "registry+https://github.com/rust-lang/crates.io-index"
7483checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c"
7484dependencies = [
7485 "pin-project 0.4.27",
7486 "tracing",
7487]
7488
7489[[package]]
7490name = "tracing-log"
7491version = "0.1.1"
7492source = "registry+https://github.com/rust-lang/crates.io-index"
7493checksum = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9"
7494dependencies = [
7495 "lazy_static",
7496 "log",
7497 "tracing-core",
7498]
7499
7500[[package]]
7501name = "tracing-serde"
7502version = "0.1.2"
7503source = "registry+https://github.com/rust-lang/crates.io-index"
7504checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b"
7505dependencies = [
7506 "serde",
7507 "tracing-core",
7508]
7509
7510[[package]]
7511name = "tracing-subscriber"
7512version = "0.2.15"
7513source = "registry+https://github.com/rust-lang/crates.io-index"
7514checksum = "a1fa8f0c8f4c594e4fc9debc1990deab13238077271ba84dd853d54902ee3401"
7515dependencies = [
7516 "ansi_term 0.12.1",
7517 "chrono",
7518 "lazy_static",
7519 "matchers",
7520 "regex",
7521 "serde",
7522 "serde_json",
7523 "sharded-slab",
7524 "smallvec 1.6.1",
7525 "thread_local",
7526 "tracing",
7527 "tracing-core",
7528 "tracing-log",
7529 "tracing-serde",
7530]
7531
7532[[package]]
6404name = "trie-db"7533name = "trie-db"
6405version = "0.21.0"7534version = "0.22.3"
6406source = "registry+https://github.com/rust-lang/crates.io-index"7535source = "registry+https://github.com/rust-lang/crates.io-index"
6407checksum = "cb230c24c741993b04cfccbabb45acff6f6480c5f00d3ed8794ea43db3a9d727"7536checksum = "ec051edf7f0fc9499a2cb0947652cab2148b9d7f61cee7605e312e9f970dacaf"
6408dependencies = [7537dependencies = [
6409 "hash-db",7538 "hash-db",
6410 "hashbrown 0.6.3",7539 "hashbrown",
6411 "log",7540 "log",
6412 "rustc-hex",7541 "rustc-hex",
6413 "smallvec 1.4.1",7542 "smallvec 1.6.1",
6414]7543]
64157544
6416[[package]]7545[[package]]
64307559
6431[[package]]7560[[package]]
6432name = "twox-hash"7561name = "twox-hash"
6433version = "1.5.0"7562version = "1.6.0"
6434source = "registry+https://github.com/rust-lang/crates.io-index"7563source = "registry+https://github.com/rust-lang/crates.io-index"
6435checksum = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56"7564checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"
6436dependencies = [7565dependencies = [
7566 "cfg-if 0.1.10",
6437 "rand 0.7.3",7567 "rand 0.7.3",
7568 "static_assertions",
6438]7569]
64397570
6440[[package]]7571[[package]]
6444checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"7575checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
64457576
6446[[package]]7577[[package]]
7578name = "ucd-trie"
7579version = "0.1.3"
7580source = "registry+https://github.com/rust-lang/crates.io-index"
7581checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
7582
7583[[package]]
6447name = "uint"7584name = "uint"
6448version = "0.8.3"7585version = "0.9.0"
6449source = "registry+https://github.com/rust-lang/crates.io-index"7586source = "registry+https://github.com/rust-lang/crates.io-index"
6450checksum = "173cd16430c206dc1a430af8a89a0e9c076cf15cb42b4aedb10e8cc8fee73681"7587checksum = "e11fe9a9348741cf134085ad57c249508345fe16411b3d7fb4ff2da2f1d6382e"
6451dependencies = [7588dependencies = [
6452 "byteorder",7589 "byteorder",
6453 "crunchy",7590 "crunchy",
6454 "rustc-hex",7591 "hex",
6455 "static_assertions",7592 "static_assertions",
6456]7593]
64577594
64757612
6476[[package]]7613[[package]]
6477name = "unicode-normalization"7614name = "unicode-normalization"
6478version = "0.1.13"7615version = "0.1.17"
6479source = "registry+https://github.com/rust-lang/crates.io-index"7616source = "registry+https://github.com/rust-lang/crates.io-index"
6480checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977"7617checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef"
6481dependencies = [7618dependencies = [
6482 "tinyvec",7619 "tinyvec",
6483]7620]
64847621
6485[[package]]7622[[package]]
6486name = "unicode-segmentation"7623name = "unicode-segmentation"
6487version = "1.6.0"7624version = "1.7.1"
6488source = "registry+https://github.com/rust-lang/crates.io-index"7625source = "registry+https://github.com/rust-lang/crates.io-index"
6489checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"7626checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
64907627
6491[[package]]7628[[package]]
6492name = "unicode-width"7629name = "unicode-width"
64967633
6497[[package]]7634[[package]]
6498name = "unicode-xid"7635name = "unicode-xid"
6499version = "0.0.4"
6500source = "registry+https://github.com/rust-lang/crates.io-index"
6501checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
6502
6503[[package]]
6504name = "unicode-xid"
6505version = "0.2.1"7636version = "0.2.1"
6506source = "registry+https://github.com/rust-lang/crates.io-index"7637source = "registry+https://github.com/rust-lang/crates.io-index"
6507checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"7638checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
6512source = "registry+https://github.com/rust-lang/crates.io-index"7643source = "registry+https://github.com/rust-lang/crates.io-index"
6513checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402"7644checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402"
6514dependencies = [7645dependencies = [
6515 "generic-array 0.14.3",7646 "generic-array 0.14.4",
6516 "subtle 2.2.3",7647 "subtle 2.4.0",
6517]7648]
65187649
6519[[package]]7650[[package]]
6520name = "unsigned-varint"7651name = "unsigned-varint"
6521version = "0.3.3"7652version = "0.5.1"
6522source = "registry+https://github.com/rust-lang/crates.io-index"7653source = "registry+https://github.com/rust-lang/crates.io-index"
6523checksum = "f67332660eb59a6f1eb24ff1220c9e8d01738a8503c6002e30bcfe4bd9f2b4a9"7654checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35"
7655
7656[[package]]
7657name = "unsigned-varint"
7658version = "0.6.0"
7659source = "registry+https://github.com/rust-lang/crates.io-index"
7660checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2"
6524dependencies = [7661dependencies = [
6525 "bytes 0.5.6",7662 "asynchronous-codec 0.5.0",
7663 "bytes 1.0.1",
6526 "futures-io",7664 "futures-io",
6527 "futures-util",7665 "futures-util",
6528 "futures_codec 0.3.4",
6529]7666]
65307667
6531[[package]]7668[[package]]
6532name = "unsigned-varint"7669name = "unsigned-varint"
6533version = "0.4.0"7670version = "0.7.0"
6534source = "registry+https://github.com/rust-lang/crates.io-index"7671source = "registry+https://github.com/rust-lang/crates.io-index"
6535checksum = "669d776983b692a906c881fcd0cfb34271a48e197e4d6cb8df32b05bfc3d3fa5"7672checksum = "5f8d425fafb8cd76bc3f22aace4af471d3156301d7508f2107e98fbeae10bc7f"
6536dependencies = [7673dependencies = [
6537 "bytes 0.5.6",7674 "asynchronous-codec 0.6.0",
6538 "futures_codec 0.4.1",7675 "bytes 1.0.1",
7676 "futures-io",
7677 "futures-util",
6539]7678]
65407679
6541[[package]]7680[[package]]
65577696
6558[[package]]7697[[package]]
6559name = "url"7698name = "url"
6560version = "2.1.1"7699version = "2.2.0"
6561source = "registry+https://github.com/rust-lang/crates.io-index"7700source = "registry+https://github.com/rust-lang/crates.io-index"
6562checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb"7701checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e"
6563dependencies = [7702dependencies = [
6564 "idna 0.2.0",7703 "form_urlencoded",
7704 "idna 0.2.1",
6565 "matches",7705 "matches",
6566 "percent-encoding 2.1.0",7706 "percent-encoding 2.1.0",
6567]7707]
65687708
6569[[package]]7709[[package]]
7710name = "value-bag"
7711version = "1.0.0-alpha.6"
7712source = "registry+https://github.com/rust-lang/crates.io-index"
7713checksum = "6b676010e055c99033117c2343b33a40a30b91fecd6c49055ac9cd2d6c305ab1"
7714dependencies = [
7715 "ctor",
7716]
7717
7718[[package]]
6570name = "vcpkg"7719name = "vcpkg"
6571version = "0.2.10"7720version = "0.2.11"
6572source = "registry+https://github.com/rust-lang/crates.io-index"7721source = "registry+https://github.com/rust-lang/crates.io-index"
6573checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"7722checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
65747723
6575[[package]]7724[[package]]
7725name = "vec-arena"
7726version = "1.0.0"
7727source = "registry+https://github.com/rust-lang/crates.io-index"
7728checksum = "eafc1b9b2dfc6f5529177b62cf806484db55b32dc7c9658a118e11bbeb33061d"
7729
7730[[package]]
6576name = "vec_map"7731name = "vec_map"
6577version = "0.8.2"7732version = "0.8.2"
6578source = "registry+https://github.com/rust-lang/crates.io-index"7733source = "registry+https://github.com/rust-lang/crates.io-index"
6591checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"7746checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
65927747
6593[[package]]7748[[package]]
7749name = "waker-fn"
7750version = "1.1.0"
7751source = "registry+https://github.com/rust-lang/crates.io-index"
7752checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
7753
7754[[package]]
6594name = "want"7755name = "want"
6595version = "0.2.0"7756version = "0.2.0"
6596source = "registry+https://github.com/rust-lang/crates.io-index"7757source = "registry+https://github.com/rust-lang/crates.io-index"
6597checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230"7758checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230"
6598dependencies = [7759dependencies = [
6599 "futures 0.1.29",7760 "futures 0.1.30",
6600 "log",7761 "log",
6601 "try-lock",7762 "try-lock",
6602]7763]
6618checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"7779checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
66197780
6620[[package]]7781[[package]]
7782name = "wasi"
7783version = "0.10.0+wasi-snapshot-preview1"
7784source = "registry+https://github.com/rust-lang/crates.io-index"
7785checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
7786
7787[[package]]
6621name = "wasm-bindgen"7788name = "wasm-bindgen"
6622version = "0.2.65"7789version = "0.2.70"
6623source = "registry+https://github.com/rust-lang/crates.io-index"7790source = "registry+https://github.com/rust-lang/crates.io-index"
6624checksum = "f3edbcc9536ab7eababcc6d2374a0b7bfe13a2b6d562c5e07f370456b1a8f33d"7791checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be"
6625dependencies = [7792dependencies = [
6626 "cfg-if",7793 "cfg-if 1.0.0",
6627 "wasm-bindgen-macro",7794 "wasm-bindgen-macro",
6628]7795]
66297796
6630[[package]]7797[[package]]
6631name = "wasm-bindgen-backend"7798name = "wasm-bindgen-backend"
6632version = "0.2.65"7799version = "0.2.70"
6633source = "registry+https://github.com/rust-lang/crates.io-index"7800source = "registry+https://github.com/rust-lang/crates.io-index"
6634checksum = "89ed2fb8c84bfad20ea66b26a3743f3e7ba8735a69fe7d95118c33ec8fc1244d"7801checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7"
6635dependencies = [7802dependencies = [
6636 "bumpalo",7803 "bumpalo",
6637 "lazy_static",7804 "lazy_static",
6638 "log",7805 "log",
6639 "proc-macro2",7806 "proc-macro2",
6640 "quote 1.0.7",7807 "quote",
6641 "syn 1.0.34",7808 "syn",
6642 "wasm-bindgen-shared",7809 "wasm-bindgen-shared",
6643]7810]
66447811
6645[[package]]7812[[package]]
6646name = "wasm-bindgen-futures"7813name = "wasm-bindgen-futures"
6647version = "0.4.15"7814version = "0.4.20"
6648source = "registry+https://github.com/rust-lang/crates.io-index"7815source = "registry+https://github.com/rust-lang/crates.io-index"
6649checksum = "41ad6e4e8b2b7f8c90b6e09a9b590ea15cb0d1dbe28502b5a405cd95d1981671"7816checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94"
6650dependencies = [7817dependencies = [
6651 "cfg-if",7818 "cfg-if 1.0.0",
6652 "js-sys",7819 "js-sys",
6653 "wasm-bindgen",7820 "wasm-bindgen",
6654 "web-sys",7821 "web-sys",
6655]7822]
66567823
6657[[package]]7824[[package]]
6658name = "wasm-bindgen-macro"7825name = "wasm-bindgen-macro"
6659version = "0.2.65"7826version = "0.2.70"
6660source = "registry+https://github.com/rust-lang/crates.io-index"7827source = "registry+https://github.com/rust-lang/crates.io-index"
6661checksum = "eb071268b031a64d92fc6cf691715ca5a40950694d8f683c5bb43db7c730929e"7828checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c"
6662dependencies = [7829dependencies = [
6663 "quote 1.0.7",7830 "quote",
6664 "wasm-bindgen-macro-support",7831 "wasm-bindgen-macro-support",
6665]7832]
66667833
6667[[package]]7834[[package]]
6668name = "wasm-bindgen-macro-support"7835name = "wasm-bindgen-macro-support"
6669version = "0.2.65"7836version = "0.2.70"
6670source = "registry+https://github.com/rust-lang/crates.io-index"7837source = "registry+https://github.com/rust-lang/crates.io-index"
6671checksum = "cf592c807080719d1ff2f245a687cbadb3ed28b2077ed7084b47aba8b691f2c6"7838checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385"
6672dependencies = [7839dependencies = [
6673 "proc-macro2",7840 "proc-macro2",
6674 "quote 1.0.7",7841 "quote",
6675 "syn 1.0.34",7842 "syn",
6676 "wasm-bindgen-backend",7843 "wasm-bindgen-backend",
6677 "wasm-bindgen-shared",7844 "wasm-bindgen-shared",
6678]7845]
66797846
6680[[package]]7847[[package]]
6681name = "wasm-bindgen-shared"7848name = "wasm-bindgen-shared"
6682version = "0.2.65"7849version = "0.2.70"
6683source = "registry+https://github.com/rust-lang/crates.io-index"7850source = "registry+https://github.com/rust-lang/crates.io-index"
6684checksum = "72b6c0220ded549d63860c78c38f3bcc558d1ca3f4efa74942c536ddbbb55e87"7851checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64"
66857852
6686[[package]]7853[[package]]
6687name = "wasm-timer"7854name = "wasm-timer"
6688version = "0.2.4"7855version = "0.2.5"
6689source = "registry+https://github.com/rust-lang/crates.io-index"7856source = "registry+https://github.com/rust-lang/crates.io-index"
6690checksum = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54"7857checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
6691dependencies = [7858dependencies = [
6692 "futures 0.3.5",7859 "futures 0.3.12",
6693 "js-sys",7860 "js-sys",
6694 "parking_lot 0.9.0",7861 "parking_lot 0.11.1",
6695 "pin-utils",7862 "pin-utils",
6696 "send_wrapper",
6697 "wasm-bindgen",7863 "wasm-bindgen",
6698 "wasm-bindgen-futures",7864 "wasm-bindgen-futures",
6699 "web-sys",7865 "web-sys",
6708 "libc",7874 "libc",
6709 "memory_units",7875 "memory_units",
6710 "num-rational",7876 "num-rational",
6711 "num-traits 0.2.12",7877 "num-traits",
6712 "parity-wasm",7878 "parity-wasm",
6713 "wasmi-validation",7879 "wasmi-validation",
6714]7880]
6723]7889]
67247890
6725[[package]]7891[[package]]
7892name = "wasmparser"
7893version = "0.57.0"
7894source = "registry+https://github.com/rust-lang/crates.io-index"
7895checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6"
7896
7897[[package]]
7898name = "wasmparser"
7899version = "0.59.0"
7900source = "registry+https://github.com/rust-lang/crates.io-index"
7901checksum = "a950e6a618f62147fd514ff445b2a0b53120d382751960797f85f058c7eda9b9"
7902
7903[[package]]
7904name = "wasmtime"
7905version = "0.19.0"
7906source = "registry+https://github.com/rust-lang/crates.io-index"
7907checksum = "1cd3c4f449382779ef6e0a7c3ec6752ae614e20a42e4100000c3efdc973100e2"
7908dependencies = [
7909 "anyhow",
7910 "backtrace",
7911 "cfg-if 0.1.10",
7912 "lazy_static",
7913 "libc",
7914 "log",
7915 "region",
7916 "rustc-demangle",
7917 "smallvec 1.6.1",
7918 "target-lexicon",
7919 "wasmparser 0.59.0",
7920 "wasmtime-environ",
7921 "wasmtime-jit",
7922 "wasmtime-profiling",
7923 "wasmtime-runtime",
7924 "wat",
7925 "winapi 0.3.9",
7926]
7927
7928[[package]]
7929name = "wasmtime-debug"
7930version = "0.19.0"
7931source = "registry+https://github.com/rust-lang/crates.io-index"
7932checksum = "6e634af9067a3af6cf2c7d33dc3b84767ddaf5d010ba68e80eecbcea73d4a349"
7933dependencies = [
7934 "anyhow",
7935 "gimli 0.21.0",
7936 "more-asserts",
7937 "object 0.20.0",
7938 "target-lexicon",
7939 "thiserror",
7940 "wasmparser 0.59.0",
7941 "wasmtime-environ",
7942]
7943
7944[[package]]
7945name = "wasmtime-environ"
7946version = "0.19.0"
7947source = "registry+https://github.com/rust-lang/crates.io-index"
7948checksum = "08f85619a94ee4034bd5bb87fc3dcf71fd2237b81c840809da1201061eec9ab3"
7949dependencies = [
7950 "anyhow",
7951 "base64 0.12.3",
7952 "bincode",
7953 "cfg-if 0.1.10",
7954 "cranelift-codegen",
7955 "cranelift-entity",
7956 "cranelift-frontend",
7957 "cranelift-wasm",
7958 "directories 2.0.2",
7959 "errno",
7960 "file-per-thread-logger",
7961 "indexmap",
7962 "libc",
7963 "log",
7964 "more-asserts",
7965 "rayon",
7966 "serde",
7967 "sha2 0.8.2",
7968 "thiserror",
7969 "toml",
7970 "wasmparser 0.59.0",
7971 "winapi 0.3.9",
7972 "zstd",
7973]
7974
7975[[package]]
7976name = "wasmtime-jit"
7977version = "0.19.0"
7978source = "registry+https://github.com/rust-lang/crates.io-index"
7979checksum = "e914c013c7a9f15f4e429d5431f2830fb8adb56e40567661b69c5ec1d645be23"
7980dependencies = [
7981 "anyhow",
7982 "cfg-if 0.1.10",
7983 "cranelift-codegen",
7984 "cranelift-entity",
7985 "cranelift-frontend",
7986 "cranelift-native",
7987 "cranelift-wasm",
7988 "gimli 0.21.0",
7989 "log",
7990 "more-asserts",
7991 "object 0.20.0",
7992 "region",
7993 "target-lexicon",
7994 "thiserror",
7995 "wasmparser 0.59.0",
7996 "wasmtime-debug",
7997 "wasmtime-environ",
7998 "wasmtime-obj",
7999 "wasmtime-profiling",
8000 "wasmtime-runtime",
8001 "winapi 0.3.9",
8002]
8003
8004[[package]]
8005name = "wasmtime-obj"
8006version = "0.19.0"
8007source = "registry+https://github.com/rust-lang/crates.io-index"
8008checksum = "e81d8e02e9bc9fe2da9b6d48bbc217f96e089f7df613f11a28a3958abc44641e"
8009dependencies = [
8010 "anyhow",
8011 "more-asserts",
8012 "object 0.20.0",
8013 "target-lexicon",
8014 "wasmtime-debug",
8015 "wasmtime-environ",
8016]
8017
8018[[package]]
8019name = "wasmtime-profiling"
8020version = "0.19.0"
8021source = "registry+https://github.com/rust-lang/crates.io-index"
8022checksum = "1e8d4d1af8dd5f7096cfcc89dd668d358e52980c38cce199643372ffd6590e27"
8023dependencies = [
8024 "anyhow",
8025 "cfg-if 0.1.10",
8026 "gimli 0.21.0",
8027 "lazy_static",
8028 "libc",
8029 "object 0.19.0",
8030 "scroll",
8031 "serde",
8032 "target-lexicon",
8033 "wasmtime-environ",
8034 "wasmtime-runtime",
8035]
8036
8037[[package]]
8038name = "wasmtime-runtime"
8039version = "0.19.0"
8040source = "registry+https://github.com/rust-lang/crates.io-index"
8041checksum = "3a25f140bbbaadb07c531cba99ce1a966dba216138dc1b2a0ddecec851a01a93"
8042dependencies = [
8043 "backtrace",
8044 "cc",
8045 "cfg-if 0.1.10",
8046 "indexmap",
8047 "lazy_static",
8048 "libc",
8049 "log",
8050 "memoffset 0.5.6",
8051 "more-asserts",
8052 "region",
8053 "thiserror",
8054 "wasmtime-environ",
8055 "winapi 0.3.9",
8056]
8057
8058[[package]]
8059name = "wast"
8060version = "33.0.0"
8061source = "registry+https://github.com/rust-lang/crates.io-index"
8062checksum = "1d04fe175c7f78214971293e7d8875673804e736092206a3a4544dbc12811c1b"
8063dependencies = [
8064 "leb128",
8065]
8066
8067[[package]]
8068name = "wat"
8069version = "1.0.34"
8070source = "registry+https://github.com/rust-lang/crates.io-index"
8071checksum = "7ec9c6ee01ae07a26adadcdfed22c7a97e0b8cbee9c06e0e96076ece5aeb5cfe"
8072dependencies = [
8073 "wast",
8074]
8075
8076[[package]]
6726name = "web-sys"8077name = "web-sys"
6727version = "0.3.42"8078version = "0.3.47"
6728source = "registry+https://github.com/rust-lang/crates.io-index"8079source = "registry+https://github.com/rust-lang/crates.io-index"
6729checksum = "8be2398f326b7ba09815d0b403095f34dd708579220d099caae89be0b32137b2"8080checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3"
6730dependencies = [8081dependencies = [
6731 "js-sys",8082 "js-sys",
6732 "wasm-bindgen",8083 "wasm-bindgen",
6733]8084]
67348085
6735[[package]]8086[[package]]
6736name = "webpki"8087name = "webpki"
6737version = "0.21.3"8088version = "0.21.4"
6738source = "registry+https://github.com/rust-lang/crates.io-index"8089source = "registry+https://github.com/rust-lang/crates.io-index"
6739checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae"8090checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea"
6740dependencies = [8091dependencies = [
6741 "ring",8092 "ring",
6742 "untrusted",8093 "untrusted",
6743]8094]
67448095
6745[[package]]8096[[package]]
6746name = "webpki-roots"8097name = "webpki-roots"
6747version = "0.18.0"8098version = "0.21.0"
6748source = "registry+https://github.com/rust-lang/crates.io-index"8099source = "registry+https://github.com/rust-lang/crates.io-index"
6749checksum = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4"8100checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376"
6750dependencies = [8101dependencies = [
6751 "webpki",8102 "webpki",
6752]8103]
67538104
6754[[package]]8105[[package]]
6755name = "webpki-roots"8106name = "wepoll-sys"
6756version = "0.19.0"8107version = "3.0.1"
6757source = "registry+https://github.com/rust-lang/crates.io-index"8108source = "registry+https://github.com/rust-lang/crates.io-index"
6758checksum = "f8eff4b7516a57307f9349c64bf34caa34b940b66fed4b2fb3136cb7386e5739"8109checksum = "0fcb14dea929042224824779fbc82d9fab8d2e6d3cbc0ac404de8edf489e77ff"
6759dependencies = [8110dependencies = [
6760 "webpki",8111 "cc",
6761]8112]
67628113
6763[[package]]8114[[package]]
6770]8121]
67718122
6772[[package]]8123[[package]]
8124name = "which"
8125version = "4.0.2"
8126source = "registry+https://github.com/rust-lang/crates.io-index"
8127checksum = "87c14ef7e1b8b8ecfc75d5eca37949410046e66f15d185c01d70824f1f8111ef"
8128dependencies = [
8129 "libc",
8130 "thiserror",
8131]
8132
8133[[package]]
6773name = "winapi"8134name = "winapi"
6774version = "0.2.8"8135version = "0.2.8"
6775source = "registry+https://github.com/rust-lang/crates.io-index"8136source = "registry+https://github.com/rust-lang/crates.io-index"
6813checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"8174checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
68148175
6815[[package]]8176[[package]]
6816name = "ws"
6817version = "0.9.1"
6818source = "registry+https://github.com/rust-lang/crates.io-index"
6819checksum = "c51a2c47b5798ccc774ffb93ff536aec7c4275d722fd9c740c83cdd1af1f2d94"
6820dependencies = [
6821 "byteorder",
6822 "bytes 0.4.12",
6823 "httparse",
6824 "log",
6825 "mio",
6826 "mio-extras",
6827 "rand 0.7.3",
6828 "sha-1",
6829 "slab",
6830 "url 2.1.1",
6831]
6832
6833[[package]]
6834name = "ws2_32-sys"8177name = "ws2_32-sys"
6835version = "0.2.1"8178version = "0.2.1"
6836source = "registry+https://github.com/rust-lang/crates.io-index"8179source = "registry+https://github.com/rust-lang/crates.io-index"
68428185
6843[[package]]8186[[package]]
6844name = "x25519-dalek"8187name = "x25519-dalek"
6845version = "0.6.0"8188version = "1.1.0"
6846source = "registry+https://github.com/rust-lang/crates.io-index"8189source = "registry+https://github.com/rust-lang/crates.io-index"
6847checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217"8190checksum = "bc614d95359fd7afc321b66d2107ede58b246b844cf5d8a0adcca413e439f088"
6848dependencies = [8191dependencies = [
6849 "curve25519-dalek",8192 "curve25519-dalek 3.0.2",
6850 "rand_core 0.5.1",8193 "rand_core 0.5.1",
6851 "zeroize",8194 "zeroize",
6852]8195]
68538196
6854[[package]]8197[[package]]
6855name = "yamux"8198name = "yamux"
6856version = "0.4.7"8199version = "0.8.0"
6857source = "registry+https://github.com/rust-lang/crates.io-index"8200source = "registry+https://github.com/rust-lang/crates.io-index"
6858checksum = "cd37e58a1256a0b328ce9c67d8b62ecdd02f4803ba443df478835cb1a41a637c"8201checksum = "9aeb8c4043cac71c3c299dff107171c220d179492350ea198e109a414981b83c"
6859dependencies = [8202dependencies = [
6860 "futures 0.3.5",8203 "futures 0.3.12",
6861 "log",8204 "log",
6862 "nohash-hasher",8205 "nohash-hasher",
6863 "parking_lot 0.10.2",8206 "parking_lot 0.11.1",
6864 "rand 0.7.3",8207 "rand 0.7.3",
6865 "static_assertions",8208 "static_assertions",
6866]8209]
68678210
6868[[package]]8211[[package]]
8212name = "yansi"
8213version = "0.5.0"
8214source = "registry+https://github.com/rust-lang/crates.io-index"
8215checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71"
8216
8217[[package]]
6869name = "zeroize"8218name = "zeroize"
6870version = "1.1.0"8219version = "1.2.0"
6871source = "registry+https://github.com/rust-lang/crates.io-index"8220source = "registry+https://github.com/rust-lang/crates.io-index"
6872checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8"8221checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36"
6873dependencies = [8222dependencies = [
6874 "zeroize_derive",8223 "zeroize_derive",
6875]8224]
68768225
6877[[package]]8226[[package]]
6878name = "zeroize_derive"8227name = "zeroize_derive"
6879version = "1.0.0"8228version = "1.0.1"
6880source = "registry+https://github.com/rust-lang/crates.io-index"8229source = "registry+https://github.com/rust-lang/crates.io-index"
6881checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2"8230checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16"
6882dependencies = [8231dependencies = [
6883 "proc-macro2",8232 "proc-macro2",
6884 "quote 1.0.7",8233 "quote",
6885 "syn 1.0.34",8234 "syn",
6886 "synstructure",8235 "synstructure",
8236]
8237
8238[[package]]
8239name = "zstd"
8240version = "0.5.4+zstd.1.4.7"
8241source = "registry+https://github.com/rust-lang/crates.io-index"
8242checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910"
8243dependencies = [
8244 "zstd-safe",
8245]
8246
8247[[package]]
8248name = "zstd-safe"
8249version = "2.0.6+zstd.1.4.7"
8250source = "registry+https://github.com/rust-lang/crates.io-index"
8251checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e"
8252dependencies = [
8253 "libc",
8254 "zstd-sys",
8255]
8256
8257[[package]]
8258name = "zstd-sys"
8259version = "1.4.18+zstd.1.4.7"
8260source = "registry+https://github.com/rust-lang/crates.io-index"
8261checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81"
8262dependencies = [
8263 "cc",
8264 "glob",
8265 "itertools",
8266 "libc",
6887]8267]
68888268
modifiedDockerfilediffbeforeafterboth
1# ===== BUILD ======1# ===== BUILD ======
22
3FROM phusion/baseimage:0.10.2 as builder3FROM phusion/baseimage:18.04-1.0.0 as builder
4LABEL maintainer="gz@usetech.com"4LABEL maintainer="UniqueNetwork.io"
55
6ENV WASM_TOOLCHAIN=nightly-2020-05-016ENV WASM_TOOLCHAIN=nightly-2021-01-27
7ENV NATIVE_TOOLCHAIN=1.49.0
78
8ARG PROFILE=release9ARG PROFILE=release
910
17WORKDIR /nft_parachain18WORKDIR /nft_parachain
18COPY . .19COPY . .
1920
20RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \21RUN export CARGO_HOME="/cargo-home" && curl https://sh.rustup.rs -sSf | sh -s -- -y
22RUN export PATH="/cargo-home/bin:$PATH" && \
23 export CARGO_HOME="/cargo-home" && \
21 export PATH="$PATH:$HOME/.cargo/bin" && \24 cargo fetch
25RUN export PATH="/cargo-home/bin:$PATH" && \
26 export CARGO_HOME="/cargo-home" && \
22 rustup toolchain uninstall $(rustup toolchain list) && \27 rustup toolchain uninstall $(rustup toolchain list) && \
23 rustup default 1.44.0 && \28 rustup toolchain install $NATIVE_TOOLCHAIN && \
24 rustup toolchain install $WASM_TOOLCHAIN && \29 rustup toolchain install $WASM_TOOLCHAIN && \
25 rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \30 rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \
31 rustup default $NATIVE_TOOLCHAIN && \
26 rustup target list --installed && \32 rustup target list --installed && \
27 rustup show && \33 rustup show
34
35RUN export PATH="/cargo-home/bin:$PATH" && \
36 export CARGO_HOME="/cargo-home" && \
28 cargo build "--$PROFILE" 37 cargo build "--$PROFILE"
29 # && \38 # && \
30 # cargo test39 # cargo test
31
32RUN cd target/release && ls -la
3340
34# ===== RUN ======41# ===== RUN ======
3542
36FROM phusion/baseimage:0.10.243FROM phusion/baseimage:18.04-1.0.0
37ARG PROFILE=release44ARG PROFILE=release
3845
39COPY --from=builder /nft_parachain/target/$PROFILE/nft /usr/local/bin46COPY --from=builder /nft_parachain/target/$PROFILE/nft /usr/local/bin
modifiedLICENSEdiffbeforeafterboth
1This is free and unencumbered software released into the public domain.1USETECH PROFESSIONAL CONFIDENTIAL
2__________________
23
3Anyone is free to copy, modify, publish, use, compile, sell, or4 [2019] - [2021] UseTech Professional LTD.
4distribute this software, either in source code form or as a compiled5 All Rights Reserved.
5binary, for any purpose, commercial or non-commercial, and by any
6means.
76
8In jurisdictions that recognize copyright laws, the author or authors7NOTICE: All information contained herein is, and remains
9of this software dedicate any and all copyright interest in the8the property of UseTech Professional LTD. and its suppliers,
10software to the public domain. We make this dedication for the benefit9if any. The intellectual and technical concepts contained
11of the public at large and to the detriment of our heirs and
12successors. We intend this dedication to be an overt act of10herein are proprietary to UseTech Professional LTD.
13relinquishment in perpetuity of all present and future rights to this11and its suppliers and may be covered by U.S. and Foreign Patents,
14software under copyright law.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF12patents in process, and are protected by trade secret or copyright law.
18MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR13Dissemination of this information or reproduction of this material
20OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,14is strictly forbidden unless prior written permission is obtained
21ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR15from UseTech Professional LTD..
22OTHER DEALINGS IN THE SOFTWARE.
23
24For more information, please refer to <http://unlicense.org>
2516
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 Rust Toolchain 1.44.0:663. Install stable toolchain 1.49.0 and make it default, install nightly 2021-01-27:
6767
68```bash68```bash
69rustup install 1.44.069rustup toolchain install 1.49.0
70rustup toolchain install nightly-2020-01-27
71rustup default nightly-2021-01-27
70```72```
7173
724. Make it default (actual toochain version may be different, so do a `rustup toolchain list` first)744. Add wasm target for nightly toolchain:
7375
74```bash76```bash
75rustup toolchain list77rustup target add wasm32-unknown-unknown --toolchain nightly-2021-01-27
76rustup default 1.44.0-x86_64-unknown-linux-gnu
77```78```
7879
795. Install nightly toolchain and add wasm target for it:805. Build:
80
81```bash81```bash
82rustup toolchain install nightly-2020-05-0182cargo build
83rustup target add wasm32-unknown-unknown --toolchain nightly-2020-05-01-x86_64-unknown-linux-gnu
84```83```
8584
866. Build:85optionally, build in release:
87
88```bash86```bash
89cargo build87cargo build --release
90```88```
9189
92## Run90## Run
136134
137Additional CLI usage options are available and may be shown by running `cargo run -- --help`.135Additional CLI usage options are available and may be shown by running `cargo run -- --help`.
138136
139## UI custom types137## Run Integration Tests
140138
1391. Install all needed dependecies
141```140```
142{
143 "Schedule": {141cd tests
144 "version": "u32",142yarn install
145 "put_code_per_byte_cost": "Gas",
146 "grow_mem_cost": "Gas",
147 "regular_op_cost": "Gas",
148 "return_data_per_byte_cost": "Gas",
149 "event_data_per_byte_cost": "Gas",
150 "event_per_topic_cost": "Gas",
151 "event_base_cost": "Gas",
152 "call_base_cost": "Gas",
153 "instantiate_base_cost": "Gas",
154 "dispatch_base_cost": "Gas",
155 "sandbox_data_read_cost": "Gas",
156 "sandbox_data_write_cost": "Gas",
157 "transfer_cost": "Gas",
158 "instantiate_cost": "Gas",
159 "max_event_topics": "u32",
160 "max_stack_height": "u32",
161 "max_memory_pages": "u32",
162 "max_table_size": "u32",
163 "enable_println": "bool",
164 "max_subject_len": "u32"
165 },
166 "CollectionMode": {
167 "_enum": {
168 "Invalid": null,
169 "NFT": "u32",
170 "Fungible": "u32",
171 "ReFungible": "(u32, u32)"
172 }
173 },
174 "Ownership": {
175 "Owner": "AccountId",
176 "Fraction": "u128"
177 },
178 "FungibleItemType": {
179 "Collection": "u64",
180 "Owner": "AccountId",
181 "Value": "u128"
182 },
183 "ReFungibleItemType": {
184 "Collection": "u64",
185 "Owner": "Vec<Ownership>",
186 "Data": "Vec<u8>"
187 },
188 "NftItemType": {
189 "Collection": "u64",
190 "Owner": "AccountId",
191 "Data": "Vec<u8>"
192 },
193 "Ownership": {
194 "owner": "AccountId",
195 "fraction": "u128"
196 },
197 "ReFungibleItemType": {
198 "Collection": "u64",
199 "Owner": "Vec<Ownership<AccountId>>",
200 "Data": "Vec<u8>"
201 },
202 "CollectionType": {
203 "Owner": "AccountId",
204 "Mode": "CollectionMode",
205 "Access": "u8",
206 "DecimalPoints": "u32",
207 "Name": "Vec<u16>",
208 "Description": "Vec<u16>",
209 "TokenPrefix": "Vec<u8>",
210 "CustomDataSize": "u32",
211 "MintMode": "bool",
212 "OffchainSchema": "Vec<u8>",
213 "Sponsor": "AccountId",
214 "UnconfirmedSponsor": "AccountId"
215 },
216 "RawData": "Vec<u8>",
217 "Address": "AccountId",
218 "LookupSource": "AccountId",
219 "Weight": "u64"
220}
221```143```
144
1452. Run tests
146```
147yarn test
148```
149
150
151## Benchmarks
152
153First of all, add rust toolchain and make it default.
154```bash
155rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-01
156```
157
158Then in "/node/src" run build command below
159```bash
160cargo +nightly-2020-10-01 build --release --features runtime-benchmarks
161```
162
163Run benchmark
164```bash
165target/release/nft benchmark --chain dev --pallet "pallet_nft" --extrinsic "*" --repeat 1
166```
167
168## UI custom types
169
170Moved to [runtime_types.json](./runtime_types.json).
171
172## Running Integration Tests
173
174See [tests/README.md](./tests/README.md).
222175
modifieddoc/application_development.mddiffbeforeafterboth
101- Owner: Address, initial owner of the NFT101- Owner: Address, initial owner of the NFT
102102
103##### Events103##### Events
104ItemCreated
105ItemId: Identifier of newly created NFT, which is unique within the Collection, so the NFT is uniquely identified with a pair of values: CollectionId and ItemId.
106Recipient: Address, owner of newly created item
104107
105- ItemCreated
106 - ItemId: Identifier of newly created NFT, which is unique within the Collection, so the NFT is uniquely
107 identified with a pair of values: CollectionId and ItemId.
108
109#### BurnItem108#### BurnItem
110109
111##### Description110##### Description
addeddoc/builders_walk_through.mddiffbeforeafterboth

no changes

addeddoc/milestone_1.mddiffbeforeafterboth

no changes

modifiednode/Cargo.tomldiffbeforeafterboth
1[build-dependencies.substrate-build-script-utils]1[build-dependencies.substrate-build-script-utils]
2git = 'https://github.com/usetech-llc/substrate.git'2git = 'https://github.com/usetech-llc/substrate.git'
3branch = 'rc4_ext_dispatch_reenabled'3branch = 'unique'
4version = '2.0.0-rc4'4version = '2.0.1'
55
6[[bin]]6[[bin]]
7name = 'nft'7name = 'nft'
12description = 'Substrate node nft'12description = 'Substrate node nft'
13edition = '2018'13edition = '2018'
14homepage = 'https://usetech.com/blockchain'14homepage = 'https://usetech.com/blockchain'
15license = 'Unlicense'15license = 'All Rights Reserved'
16name = 'nft'16name = 'nft'
17repository = 'https://github.com/substrate-developer-hub/nft/'17repository = 'https://github.com/usetech-llc/nft_private/'
18version = '2.0.0-rc4'18version = '3.0.0'
1919
20[package.metadata.docs.rs]20[package.metadata.docs.rs]
21targets = ['x86_64-unknown-linux-gnu']21targets = ['x86_64-unknown-linux-gnu']
2222
23[dependencies]23[dependencies]
24futures = '0.3.4'24futures = '0.3.4'
25log = '0.4.8'25log = '0.4.8'
26flexi_logger = "0.15.7"
26parking_lot = '0.10.0'27parking_lot = '0.10.0'
27structopt = '0.3.8'28structopt = '0.3.8'
28jsonrpc-core = '14.0.5'29jsonrpc-core = '15.0.0'
2930
31# Substrate dependencies
30[dependencies.nft-runtime]32nft-runtime = { path = '../runtime', version = '2.1.0' }
31path = '../runtime'
32version = '2.0.0-rc4'
33
34[dependencies.sc-basic-authorship]
35git = 'https://github.com/usetech-llc/substrate.git'33frame-benchmarking = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
36branch = 'rc4_ext_dispatch_reenabled'
37version = '0.8.0-rc4'34frame-benchmarking-cli = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
38
39[dependencies.sc-cli]
40git = 'https://github.com/usetech-llc/substrate.git'
41branch = 'rc4_ext_dispatch_reenabled'
42version = '0.8.0-rc4'35pallet-transaction-payment-rpc = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
43
44[dependencies.sc-client-api]
45git = 'https://github.com/usetech-llc/substrate.git'
46branch = 'rc4_ext_dispatch_reenabled'
47version = '2.0.0-rc4'36sc-basic-authorship = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
48
49[dependencies.sc-consensus]
50git = 'https://github.com/usetech-llc/substrate.git'
51branch = 'rc4_ext_dispatch_reenabled'
52version = '0.8.0-rc4'37sc-cli = { features = ['wasmtime'], version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
53
54[dependencies.pallet-contracts-rpc]
55git = 'https://github.com/usetech-llc/substrate.git'
56version = '0.8.0-rc4'38sc-client-api = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
57branch = 'rc4_ext_dispatch_reenabled'
58
59[dependencies.sc-rpc]
60git = 'https://github.com/usetech-llc/substrate.git'39sc-consensus = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
61branch = 'rc4_ext_dispatch_reenabled'
62
63[dependencies.sc-consensus-aura]40sc-consensus-aura = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
64git = 'https://github.com/usetech-llc/substrate.git'
65branch = 'rc4_ext_dispatch_reenabled'
66version = '0.8.0-rc4'41sc-executor = { features = ['wasmtime'], version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
67
68[dependencies.sc-executor]
69git = 'https://github.com/usetech-llc/substrate.git'
70branch = 'rc4_ext_dispatch_reenabled'
71version = '0.8.0-rc4'42sc-finality-grandpa = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
72
73[dependencies.sc-finality-grandpa]
74git = 'https://github.com/usetech-llc/substrate.git'
75branch = 'rc4_ext_dispatch_reenabled'
76version = '0.8.0-rc4'43sc-rpc = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
77
78[dependencies.sc-network]
79git = 'https://github.com/usetech-llc/substrate.git'
80branch = 'rc4_ext_dispatch_reenabled'
81version = '0.8.0-rc4'44sc-rpc-api = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
82
83[dependencies.sc-service]
84git = 'https://github.com/usetech-llc/substrate.git'
85branch = 'rc4_ext_dispatch_reenabled'
86version = '0.8.0-rc4'45sc-service = { features = ['wasmtime'], version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
87
88[dependencies.sc-transaction-pool]46sc-transaction-pool = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
89git = 'https://github.com/usetech-llc/substrate.git'47sp-api = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
90branch = 'rc4_ext_dispatch_reenabled'
91version = '2.0.0-rc4'48sp-block-builder = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
92
93[dependencies.sp-consensus]
94git = 'https://github.com/usetech-llc/substrate.git'49sp-blockchain = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
95branch = 'rc4_ext_dispatch_reenabled'
96version = '0.8.0-rc4'50sp-consensus = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
97
98[dependencies.sp-consensus-aura]
99git = 'https://github.com/usetech-llc/substrate.git'
100branch = 'rc4_ext_dispatch_reenabled'
101version = '0.8.0-rc4'51sp-consensus-aura = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
102
103[dependencies.sp-core]52sp-core = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
104git = 'https://github.com/usetech-llc/substrate.git'53sp-finality-grandpa = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
105branch = 'rc4_ext_dispatch_reenabled'
106version = '2.0.0-rc4'54sp-inherents = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
107
108[dependencies.sp-finality-grandpa]
109git = 'https://github.com/usetech-llc/substrate.git'55sp-runtime = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
110branch = 'rc4_ext_dispatch_reenabled'
111version = '2.0.0-rc4'56sp-transaction-pool = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
112
113[dependencies.sp-inherents]
114git = 'https://github.com/usetech-llc/substrate.git'57sc-network = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
115branch = 'rc4_ext_dispatch_reenabled'
116version = '2.0.0-rc4'58substrate-frame-rpc-system = {version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
117
118[dependencies.sp-runtime]
119git = 'https://github.com/usetech-llc/substrate.git'59pallet-contracts-rpc = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique'}
120branch = 'rc4_ext_dispatch_reenabled'
121version = '2.0.0-rc4'60sc-keystore = { version = "2.0.0", git = "https://github.com/usetech-llc/substrate.git", branch = 'unique'}
122
123[dependencies.sp-transaction-pool]
124git = 'https://github.com/usetech-llc/substrate.git'61sc-telemetry = { version = "2.0.0", git = "https://github.com/usetech-llc/substrate.git", branch = 'unique'}
125branch = 'rc4_ext_dispatch_reenabled'62
126version = '2.0.0-rc4'63serde = { version = "1.0.102", features = ["derive"] }
64serde_json = "1.0.41"
65
66[features]
67default = []
68runtime-benchmarks = ['nft-runtime/runtime-benchmarks']
12769
modifiednode/build.rsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
1use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};6use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
27
modifiednode/src/chain_spec.rsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
6// use nft_runtime::{
7// AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig,
8// SystemConfig, WASM_BINARY,
9// };
10// use nft_runtime::{ContractsConfig, ContractsSchedule, NftConfig, CollectionType};
1use nft_runtime::{11use nft_runtime::*;
2 AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig,
3 SystemConfig, WASM_BINARY,
4};
5use nft_runtime::{ContractsConfig, ContractsSchedule};
6use sc_service::ChainType;12use sc_service::ChainType;
7use sp_consensus_aura::sr25519::AuthorityId as AuraId;13use sp_consensus_aura::sr25519::AuthorityId as AuraId;
8use sp_core::{sr25519, Pair, Public};14use sp_core::{sr25519, Pair, Public};
9use sp_finality_grandpa::AuthorityId as GrandpaId;15use sp_finality_grandpa::AuthorityId as GrandpaId;
10use sp_runtime::traits::{IdentifyAccount, Verify};16use sp_runtime::traits::{IdentifyAccount, Verify};
17use serde_json::map::Map;
1118
12// Note this is the URL for the telemetry server19// Note this is the URL for the telemetry server
13//const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";20//const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
37 (get_from_seed::<AuraId>(s), get_from_seed::<GrandpaId>(s))44 (get_from_seed::<AuraId>(s), get_from_seed::<GrandpaId>(s))
38}45}
3946
40pub fn development_config() -> ChainSpec {47pub fn development_config() -> Result<ChainSpec, String> {
48 let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;
49
50 let mut properties = Map::new();
51 properties.insert("tokenSymbol".into(), "UniqueTest".into());
52 properties.insert("tokenDecimals".into(), 15.into());
53 properties.insert("ss58Format".into(), 42.into()); // Generic Substrate wildcard (SS58 checksum preimage)
54
41 ChainSpec::from_genesis(55 Ok(ChainSpec::from_genesis(
56 // Name
42 "Development",57 "Development",
58 // ID
43 "dev",59 "dev",
44 ChainType::Development,60 ChainType::Development,
45 || {61 move || testnet_genesis(
46 testnet_genesis(62 wasm_binary,
63 // Initial PoA authorities
47 vec![authority_keys_from_seed("Alice")],64 vec![
65 authority_keys_from_seed("Alice"),
66 ],
67 // Sudo account
48 get_account_id_from_seed::<sr25519::Public>("Alice"),68 get_account_id_from_seed::<sr25519::Public>("Alice"),
69 // Pre-funded accounts
49 vec![70 vec![
50 get_account_id_from_seed::<sr25519::Public>("Alice"),71 get_account_id_from_seed::<sr25519::Public>("Alice"),
51 get_account_id_from_seed::<sr25519::Public>("Bob"),72 get_account_id_from_seed::<sr25519::Public>("Bob"),
54 ],75 ],
55 true,76 true,
56 )77 ),
57 },78 // Bootnodes
58 vec![],79 vec![],
80 // Telemetry
59 None,81 None,
82 // Protocol ID
60 None,83 None,
84 // Properties
61 None,85 Some(properties),
86 // Extensions
62 None,87 None,
63 )88 ))
64}89}
6590
66pub fn local_testnet_config() -> ChainSpec {91pub fn local_testnet_config() -> Result<ChainSpec, String> {
92 let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;
93
67 ChainSpec::from_genesis(94 Ok(ChainSpec::from_genesis(
95 // Name
68 "Local Testnet",96 "Local Testnet",
97 // ID
69 "local_testnet",98 "local_testnet",
70 ChainType::Local,99 ChainType::Local,
71 || {100 move || testnet_genesis(
72 testnet_genesis(101 wasm_binary,
102 // Initial PoA authorities
73 vec![103 vec![
74 authority_keys_from_seed("Alice"),104 authority_keys_from_seed("Alice"),
75 authority_keys_from_seed("Bob"),105 authority_keys_from_seed("Bob"),
76 ],106 ],
107 // Sudo account
77 get_account_id_from_seed::<sr25519::Public>("Alice"),108 get_account_id_from_seed::<sr25519::Public>("Alice"),
109 // Pre-funded accounts
78 vec![110 vec![
79 get_account_id_from_seed::<sr25519::Public>("Alice"),111 get_account_id_from_seed::<sr25519::Public>("Alice"),
80 get_account_id_from_seed::<sr25519::Public>("Bob"),112 get_account_id_from_seed::<sr25519::Public>("Bob"),
91 ],123 ],
92 true,124 true,
93 )125 ),
94 },126 // Bootnodes
95 vec![],127 vec![],
128 // Telemetry
96 None,129 None,
130 // Protocol ID
97 None,131 None,
132 // Properties
98 None,133 None,
134 // Extensions
99 None,135 None,
100 )136 ))
101}137}
102138
103fn testnet_genesis(139fn testnet_genesis(
140 wasm_binary: &[u8],
104 initial_authorities: Vec<(AuraId, GrandpaId)>,141 initial_authorities: Vec<(AuraId, GrandpaId)>,
105 root_key: AccountId,142 root_key: AccountId,
106 endowed_accounts: Vec<AccountId>,143 endowed_accounts: Vec<AccountId>,
107 enable_println: bool,144 enable_println: bool,
108) -> GenesisConfig {145) -> GenesisConfig {
146
147 let vested_accounts = vec![
148 get_account_id_from_seed::<sr25519::Public>("Bob"),
149 ];
150
109 GenesisConfig {151 GenesisConfig {
110 system: Some(SystemConfig {152 system: Some(SystemConfig {
111 code: WASM_BINARY.to_vec(),153 code: wasm_binary.to_vec(),
112 changes_trie_config: Default::default(),154 changes_trie_config: Default::default(),
113 }),155 }),
114 balances: Some(BalancesConfig {156 pallet_balances: Some(BalancesConfig {
115 balances: endowed_accounts157 balances: endowed_accounts
116 .iter()158 .iter()
117 .cloned()159 .cloned()
118 .map(|k| (k, 1 << 100))160 .map(|k| (k, 1 << 100))
119 .collect(),161 .collect(),
120 }),162 }),
121 aura: Some(AuraConfig {163 pallet_aura: Some(AuraConfig {
122 authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),164 authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),
123 }),165 }),
124 grandpa: Some(GrandpaConfig {166 pallet_grandpa: Some(GrandpaConfig {
125 authorities: initial_authorities167 authorities: initial_authorities
126 .iter()168 .iter()
127 .map(|x| (x.1.clone(), 1))169 .map(|x| (x.1.clone(), 1))
128 .collect(),170 .collect(),
129 }),171 }),
172 pallet_treasury: Some(Default::default()),
130 sudo: Some(SudoConfig { key: root_key }),173 pallet_sudo: Some(SudoConfig { key: root_key }),
174 pallet_vesting: Some(VestingConfig {
175 vesting: vested_accounts
176 .iter()
177 .cloned()
178 .map(|k| (k, 1000, 100, 1 << 98))
179 .collect(),
180 }),
181 pallet_nft: Some(NftConfig {
182 collection: vec![(
183 1,
184 CollectionType {
185 owner: get_account_id_from_seed::<sr25519::Public>("Alice"),
186 mode: CollectionMode::NFT,
187 access: AccessMode::Normal,
188 decimal_points: 0,
189 name: vec![],
190 description: vec![],
191 token_prefix: vec![],
192 mint_mode: false,
193 offchain_schema: vec![],
194 schema_version: SchemaVersion::default(),
195 sponsor: get_account_id_from_seed::<sr25519::Public>("Alice"),
196 sponsor_confirmed: true,
197 const_on_chain_schema: vec![],
198 variable_on_chain_schema: vec![],
199 limits: CollectionLimits::default()
200 },
201 )],
202 nft_item_id: vec![],
203 fungible_item_id: vec![],
204 refungible_item_id: vec![],
205 chain_limit: ChainLimits {
206 collection_numbers_limit: 100000,
207 account_token_ownership_limit: 1000000,
208 collections_admins_limit: 5,
209 custom_data_limit: 2048,
210 nft_sponsor_transfer_timeout: 15,
211 fungible_sponsor_transfer_timeout: 15,
212 refungible_sponsor_transfer_timeout: 15,
213 offchain_schema_limit: 1024,
214 variable_on_chain_schema_limit: 1024,
215 const_on_chain_schema_limit: 1024,
216 },
217 }),
131 contracts: Some(ContractsConfig {218 pallet_contracts: Some(ContractsConfig {
132 current_schedule: ContractsSchedule {219 current_schedule: ContractsSchedule {
133 enable_println,220 enable_println,
134 ..Default::default()221 ..Default::default()
modifiednode/src/cli.rsdiffbeforeafterboth
1use sc_cli::{RunCmd, Subcommand};1use structopt::StructOpt;
2use structopt::StructOpt;2use sc_cli::RunCmd;
33
4#[derive(Debug, StructOpt)]4#[derive(Debug, StructOpt)]
5pub struct Cli {5pub struct Cli {
10 pub run: RunCmd,10 pub run: RunCmd,
11}11}
12
13#[derive(Debug, StructOpt)]
14pub enum Subcommand {
15 /// Key management cli utilities
16 Key(sc_cli::KeySubcommand),
17 /// Build a chain specification.
18 BuildSpec(sc_cli::BuildSpecCmd),
19
20 /// Validate blocks.
21 CheckBlock(sc_cli::CheckBlockCmd),
22
23 /// Export blocks.
24 ExportBlocks(sc_cli::ExportBlocksCmd),
25
26 /// Export the state of a given block into a chain spec.
27 ExportState(sc_cli::ExportStateCmd),
28
29 /// Import blocks.
30 ImportBlocks(sc_cli::ImportBlocksCmd),
31
32 /// Remove the whole chain.
33 PurgeChain(sc_cli::PurgeChainCmd),
34
35 /// Revert the chain to a previous state.
36 Revert(sc_cli::RevertCmd),
37
38 /// The custom benchmark subcommmand benchmarking runtime pallets.
39 #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
40 Benchmark(frame_benchmarking_cli::BenchmarkCmd),
41}
1242
modifiednode/src/command.rsdiffbeforeafterboth
1// This file is part of Substrate.1// This file is part of Substrate.
22
3// Copyright (C) 2017-2020 Parity Technologies (UK) Ltd.3// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.04// SPDX-License-Identifier: Apache-2.0
55
6// Licensed under the Apache License, Version 2.0 (the "License");6// Licensed under the Apache License, Version 2.0 (the "License");
15// See the License for the specific language governing permissions and15// See the License for the specific language governing permissions and
16// limitations under the License.16// limitations under the License.
1717
18use crate::chain_spec;18use crate::{chain_spec, service};
19use crate::cli::Cli;19use crate::cli::{Cli, Subcommand};
20use crate::service;20use sc_cli::{SubstrateCli, RuntimeVersion, Role, ChainSpec};
21use sc_cli::SubstrateCli;21use sc_service::PartialComponents;
22use nft_runtime::Block;
2223
23impl SubstrateCli for Cli {24impl SubstrateCli for Cli {
24 fn impl_name() -> &'static str {25 fn impl_name() -> String {
25 "Substrate Node"26 "Unique Node".into()
26 }27 }
2728
28 fn impl_version() -> &'static str {29 fn impl_version() -> String {
29 env!("SUBSTRATE_CLI_IMPL_VERSION")30 env!("SUBSTRATE_CLI_IMPL_VERSION").into()
30 }31 }
3132
32 fn description() -> &'static str {33 fn description() -> String {
33 env!("CARGO_PKG_DESCRIPTION")34 env!("CARGO_PKG_DESCRIPTION").into()
34 }35 }
3536
36 fn author() -> &'static str {37 fn author() -> String {
37 env!("CARGO_PKG_AUTHORS")38 env!("CARGO_PKG_AUTHORS").into()
38 }39 }
3940
40 fn support_url() -> &'static str {41 fn support_url() -> String {
41 "support.anonymous.an"42 "support.anonymous.an".into()
42 }43 }
4344
44 fn copyright_start_year() -> i32 {45 fn copyright_start_year() -> i32 {
45 201746 2017
46 }47 }
47
48 fn executable_name() -> &'static str {
49 env!("CARGO_PKG_NAME")
50 }
5148
52 fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {49 fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
53 Ok(match id {50 Ok(match id {
54 "dev" => Box::new(chain_spec::development_config()),51 "dev" => Box::new(chain_spec::development_config()?),
55 "" | "local" => Box::new(chain_spec::local_testnet_config()),52 "" | "local" => Box::new(chain_spec::local_testnet_config()?),
56 path => Box::new(chain_spec::ChainSpec::from_json_file(53 path => Box::new(chain_spec::ChainSpec::from_json_file(
57 std::path::PathBuf::from(path),54 std::path::PathBuf::from(path),
58 )?),55 )?),
59 })56 })
60 }57 }
58
59 fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
60 &nft_runtime::VERSION
61 }
61}62}
6263
63/// Parse and run command line arguments64/// Parse and run command line arguments
64pub fn run() -> sc_cli::Result<()> {65pub fn run() -> sc_cli::Result<()> {
65 let cli = Cli::from_args();66 let cli = Cli::from_args();
6667
67 match &cli.subcommand {68 match &cli.subcommand {
69 Some(Subcommand::Key(cmd)) => cmd.run(&cli),
70 Some(Subcommand::BuildSpec(cmd)) => {
71 let runner = cli.create_runner(cmd)?;
72 runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
73 },
74 Some(Subcommand::CheckBlock(cmd)) => {
75 let runner = cli.create_runner(cmd)?;
76 runner.async_run(|config| {
77 let PartialComponents { client, task_manager, import_queue, ..}
78 = service::new_partial(&config)?;
79 Ok((cmd.run(client, import_queue), task_manager))
80 })
81 },
82 Some(Subcommand::ExportBlocks(cmd)) => {
83 let runner = cli.create_runner(cmd)?;
84 runner.async_run(|config| {
85 let PartialComponents { client, task_manager, ..}
86 = service::new_partial(&config)?;
87 Ok((cmd.run(client, config.database), task_manager))
88 })
89 },
68 Some(subcommand) => {90 Some(Subcommand::ExportState(cmd)) => {
69 let runner = cli.create_runner(subcommand)?;91 let runner = cli.create_runner(cmd)?;
70 runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0))92 runner.async_run(|config| {
93 let PartialComponents { client, task_manager, ..}
94 = service::new_partial(&config)?;
95 Ok((cmd.run(client, config.chain_spec), task_manager))
96 })
71 }97 },
98 Some(Subcommand::ImportBlocks(cmd)) => {
99 let runner = cli.create_runner(cmd)?;
100 runner.async_run(|config| {
101 let PartialComponents { client, task_manager, import_queue, ..}
102 = service::new_partial(&config)?;
103 Ok((cmd.run(client, import_queue), task_manager))
104 })
105 },
106 Some(Subcommand::PurgeChain(cmd)) => {
107 let runner = cli.create_runner(cmd)?;
108 runner.sync_run(|config| cmd.run(config.database))
109 },
110 Some(Subcommand::Revert(cmd)) => {
111 let runner = cli.create_runner(cmd)?;
112 runner.async_run(|config| {
113 let PartialComponents { client, task_manager, backend, ..}
114 = service::new_partial(&config)?;
115 Ok((cmd.run(client, backend), task_manager))
116 })
117 },
118 Some(Subcommand::Benchmark(cmd)) => {
119 if cfg!(feature = "runtime-benchmarks") {
120 let runner = cli.create_runner(cmd)?;
121
122 runner.sync_run(|config| cmd.run::<Block, service::Executor>(config))
123 } else {
124 Err("Benchmarking wasn't enabled when building the node. \
125 You can enable it with `--features runtime-benchmarks`.".into())
126 }
127 },
72 None => {128 None => {
73 let runner = cli.create_runner(&cli.run)?;129 let runner = cli.create_runner(&cli.run)?;
74 runner.run_node(service::new_light, service::new_full, nft_runtime::VERSION)130 runner.run_node_until_exit(|config| async move {
131 match config.role {
132 Role::Light => service::new_light(config),
133 _ => service::new_full(config),
134 }.map_err(sc_cli::Error::Service)
135 })
75 }136 }
76 }137 }
77}138}
addednode/src/lib.rsdiffbeforeafterboth

no changes

modifiednode/src/main.rsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
1//! Substrate Node Template CLI library.6//! Substrate Node Template CLI library.
2#![warn(missing_docs)]7#![warn(missing_docs)]
6mod service;11mod service;
7mod cli;12mod cli;
8mod command;13mod command;
14mod rpc;
915
10fn main() -> sc_cli::Result<()> {16fn main() -> sc_cli::Result<()> {
11 command::run()17 command::run()
addednode/src/rpc.rsdiffbeforeafterboth

no changes

modifiednode/src/service.rsdiffbeforeafterboth
1//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.1//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
22
3//
4// This file is subject to the terms and conditions defined in
5// file 'LICENSE', which is part of this source code package.
6//
7
8use std::sync::Arc;
9use std::time::Duration;
10use sc_client_api::{ExecutorProvider, RemoteBackend};
3use nft_runtime::{self, opaque::Block, RuntimeApi};11use nft_runtime::{self, opaque::Block, RuntimeApi};
4use sc_client_api::ExecutorProvider;12use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
5use sc_consensus::LongestChain;13use sp_inherents::InherentDataProviders;
6use sc_executor::native_executor_instance;14use sc_executor::native_executor_instance;
7pub use sc_executor::NativeExecutor;15pub use sc_executor::NativeExecutor;
8use sc_finality_grandpa::{16use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
9 FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState,
10 StorageAndProofProvider,
11};
12use sc_service::{error::Error as ServiceError, AbstractService, Configuration, ServiceBuilder};
13use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
14use sp_inherents::InherentDataProviders;17use sc_finality_grandpa::SharedVoterState;
15use std::sync::Arc;18use sc_keystore::LocalKeystore;
16use std::time::Duration;19use sc_telemetry::TelemetrySpan;
1720
18// Our native executor instance.21// Our native executor instance.
19native_executor_instance!(22native_executor_instance!(
20 pub Executor,23 pub Executor,
21 nft_runtime::api::dispatch,24 nft_runtime::api::dispatch,
22 nft_runtime::native_version,25 nft_runtime::native_version,
26 frame_benchmarking::benchmarking::HostFunctions,
23);27);
2428
25/// Starts a `ServiceBuilder` for a full service.29type FullClient = sc_service::TFullClient<Block, RuntimeApi, Executor>;
26///
27/// Use this macro if you don't actually need the full service, but just the builder in order to
28/// be able to perform chain operations.
29macro_rules! new_full_start {
30 ($config:expr) => {{
31 use jsonrpc_core::IoHandler;
32 use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;30type FullBackend = sc_service::TFullBackend<Block>;
33 use std::sync::Arc;31type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;
3432
35 let mut import_setup = None;33pub fn new_partial(config: &Configuration) -> Result<sc_service::PartialComponents<
34 FullClient, FullBackend, FullSelectChain,
35 sp_consensus::DefaultImportQueue<Block, FullClient>,
36 sc_transaction_pool::FullPool<Block, FullClient>,
37 (
38 sc_consensus_aura::AuraBlockImport<
39 Block,
40 FullClient,
41 sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,
42 AuraPair
43 >,
36 let inherent_data_providers = sp_inherents::InherentDataProviders::new();44 sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
45 Option<TelemetrySpan>,
46 )
47>, ServiceError> {
48 if config.keystore_remote.is_some() {
49 return Err(ServiceError::Other(
50 format!("Remote Keystores are not supported.")))
51 }
52 let inherent_data_providers = sp_inherents::InherentDataProviders::new();
3753
38 let builder = sc_service::ServiceBuilder::new_full::<54 let (client, backend, keystore_container, task_manager, telemetry_span) =
39 nft_runtime::opaque::Block,55 sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
40 nft_runtime::RuntimeApi,
41 crate::service::Executor,
42 >($config)?
43 .with_select_chain(|_config, backend| Ok(sc_consensus::LongestChain::new(backend.clone())))?
44 .with_transaction_pool(|builder| {
45 let pool_api = sc_transaction_pool::FullChainApi::new(builder.client().clone());56 let client = Arc::new(client);
46 Ok(sc_transaction_pool::BasicPool::new(
47 builder.config().transaction_pool.clone(),
48 std::sync::Arc::new(pool_api),
49 builder.prometheus_registry(),
50 ))
51 })?
52 .with_import_queue(
53 |_config, client, mut select_chain, _transaction_pool, spawn_task_handle, registry| {
54 let select_chain = select_chain
55 .take()
56 .ok_or_else(|| sc_service::Error::SelectChainRequired)?;
5757
58 let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import(58 let select_chain = sc_consensus::LongestChain::new(backend.clone());
59 client.clone(),
60 &(client.clone() as Arc<_>),
61 select_chain,
62 )?;
6359
64 let aura_block_import =60 let transaction_pool = sc_transaction_pool::BasicPool::new_full(
65 sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
66 grandpa_block_import.clone(),61 config.transaction_pool.clone(),
62 config.prometheus_registry(),
63 task_manager.spawn_handle(),
67 client.clone(),64 client.clone(),
68 );65 );
6966
70 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(67 let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import(
71 sc_consensus_aura::slot_duration(&*client)?,68 client.clone(), &(client.clone() as Arc<_>), select_chain.clone(),
72 aura_block_import,
73 Some(Box::new(grandpa_block_import.clone())),
74 None,
75 client,
76 inherent_data_providers.clone(),
77 spawn_task_handle,
78 registry,
79 )?;69 )?;
8070
81 import_setup = Some((grandpa_block_import, grandpa_link));71 let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
72 grandpa_block_import.clone(), client.clone(),
73 );
8274
83 Ok(import_queue)75 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
84 },
85 )?76 sc_consensus_aura::slot_duration(&*client)?,
86 .with_rpc_extensions(|builder| -> Result<IoHandler<sc_rpc::Metadata>, _> {77 aura_block_import.clone(),
87 let handler = pallet_contracts_rpc::Contracts::new(builder.client().clone());78 Some(Box::new(grandpa_block_import.clone())),
79 client.clone(),
80 inherent_data_providers.clone(),
81 &task_manager.spawn_handle(),
82 config.prometheus_registry(),
88 let delegate = pallet_contracts_rpc::ContractsApi::to_delegate(handler);83 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
84 )?;
8985
90 let mut io = IoHandler::default();86 Ok(sc_service::PartialComponents {
87 client,
88 backend,
89 task_manager,
90 import_queue,
91 keystore_container,
92 select_chain,
93 transaction_pool,
94 inherent_data_providers,
91 io.extend_with(delegate);95 other: (aura_block_import, grandpa_link, telemetry_span),
92 Ok(io)
93 })?;96 })
97}
9498
95 (builder, import_setup, inherent_data_providers)99fn remote_keystore(_url: &String) -> Result<Arc<LocalKeystore>, &'static str> {
100 // FIXME: here would the concrete keystore be built,
101 // must return a concrete type (NOT `LocalKeystore`) that
96 }};102 // implements `CryptoStore` and `SyncCryptoStore`
103 Err("Remote Keystore not supported.")
97}104}
98105
99/// Builds a new service for a full client.106/// Builds a new service for a full client.
100pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceError> {107pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError> {
101 let role = config.role.clone();108 let sc_service::PartialComponents {
109 client,
110 backend,
111 mut task_manager,
112 import_queue,
102 let force_authoring = config.force_authoring;113 mut keystore_container,
114 select_chain,
115 transaction_pool,
116 inherent_data_providers,
103 let name = config.network.node_name.clone();117 other: (block_import, grandpa_link, telemetry_span),
104 let disable_grandpa = config.disable_grandpa;118 } = new_partial(&config)?;
105119
106 let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config);120 if let Some(url) = &config.keystore_remote {
121 match remote_keystore(url) {
122 Ok(k) => keystore_container.set_remote_keystore(k),
123 Err(e) => {
124 return Err(ServiceError::Other(
125 format!("Error hooking up remote keystore for {}: {}", url, e)))
126 }
127 };
128 }
107129
108 let (block_import, grandpa_link) = import_setup.take().expect(130 config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config());
109 "Link Half and Block Import are present for Full Services or setup failed before. qed",
110 );
111131
112 let service = builder132 let (network, network_status_sinks, system_rpc_tx, network_starter) =
113 .with_finality_proof_provider(|client, backend| {
114 // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider
115 let provider = client as Arc<dyn StorageAndProofProvider<_, _>>;
116 Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)133 sc_service::build_network(sc_service::BuildNetworkParams {
134 config: &config,
135 client: client.clone(),
117 })?136 transaction_pool: transaction_pool.clone(),
118 .build_full()?;137 spawn_handle: task_manager.spawn_handle(),
138 import_queue,
139 on_demand: None,
140 block_announce_validator_builder: None,
141 })?;
119142
120 if role.is_authority() {143 if config.offchain_worker.enabled {
121 let proposer = sc_basic_authorship::ProposerFactory::new(144 sc_service::build_offchain_workers(
122 service.client(),145 &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(),
123 service.transaction_pool(),
124 service.prometheus_registry().as_ref(),
125 );146 );
147 }
126148
127 let client = service.client();149 let role = config.role.clone();
128 let select_chain = service150 let force_authoring = config.force_authoring;
129 .select_chain()151 let backoff_authoring_blocks: Option<()> = None;
152 let name = config.network.node_name.clone();
130 .ok_or(ServiceError::SelectChainRequired)?;153 let enable_grandpa = !config.disable_grandpa;
154 let prometheus_registry = config.prometheus_registry().cloned();
131155
132 let can_author_with =156 let rpc_extensions_builder = {
133 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());157 let client = client.clone();
158 let pool = transaction_pool.clone();
134159
135 let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>(160 Box::new(move |deny_unsafe, _| {
161 let deps = crate::rpc::FullDeps {
136 sc_consensus_aura::slot_duration(&*client)?,162 client: client.clone(),
137 client,
138 select_chain,
139 block_import,
140 proposer,
141 service.network(),
142 inherent_data_providers.clone(),163 pool: pool.clone(),
143 force_authoring,164 deny_unsafe,
144 service.keystore(),
145 can_author_with,
146 )?;165 };
147166
148 // the AURA authoring task is considered essential, i.e. if it
149 // fails we take down the service with it.
150 service
151 .spawn_essential_task_handle()167 crate::rpc::create_full(deps)
152 .spawn_blocking("aura", aura);168 })
153 }169 };
154170
155 // if the node isn't actively participating in consensus then it doesn't171 let (_rpc_handlers, telemetry_connection_notifier) = sc_service::spawn_tasks(
172 sc_service::SpawnTasksParams {
156 // need a keystore, regardless of which protocol we use below.173 network: network.clone(),
174 client: client.clone(),
157 let keystore = if role.is_authority() {175 keystore: keystore_container.sync_keystore(),
158 Some(service.keystore() as sp_core::traits::BareCryptoStorePtr)176 task_manager: &mut task_manager,
159 } else {177 transaction_pool: transaction_pool.clone(),
178 rpc_extensions_builder,
160 None179 on_demand: None,
161 };180 remote_blockchain: None,
181 backend,
182 network_status_sinks,
183 system_rpc_tx,
184 config,
185 telemetry_span,
186 },
187 )?;
162188
163 let grandpa_config = sc_finality_grandpa::Config {189 if role.is_authority() {
164 // FIXME #1578 make this available through chainspec
165 gossip_duration: Duration::from_millis(333),190 let proposer = sc_basic_authorship::ProposerFactory::new(
166 justification_period: 512,191 task_manager.spawn_handle(),
167 name: Some(name),192 client.clone(),
168 observer_enabled: false,193 transaction_pool,
169 keystore,
170 is_authority: role.is_network_authority(),194 prometheus_registry.as_ref(),
171 };195 );
172196
173 let enable_grandpa = !disable_grandpa;197 let can_author_with =
174 if enable_grandpa {
175 // start the full GRANDPA voter
176 // NOTE: non-authorities could run the GRANDPA observer protocol, but at198 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
177 // this point the full voter should provide better guarantees of block
178 // and vote data availability than the observer. The observer has not
179 // been tested extensively yet and having most nodes in a network run it
180 // could lead to finality stalls.
181 let grandpa_config = sc_finality_grandpa::GrandpaParams {
182 config: grandpa_config,
183 link: grandpa_link,
184 network: service.network(),
185 inherent_data_providers: inherent_data_providers.clone(),
186 telemetry_on_connect: Some(service.telemetry_on_connect_stream()),
187 voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
188 prometheus_registry: service.prometheus_registry(),
189 shared_voter_state: SharedVoterState::empty(),
190 };
191199
192 // the GRANDPA voter task is considered infallible, i.e.200 let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _,_>(
193 // if it fails we take down the service with it.
194 service.spawn_essential_task_handle().spawn_blocking(
195 "grandpa-voter",
196 sc_finality_grandpa::run_grandpa_voter(grandpa_config)?,201 sc_consensus_aura::slot_duration(&*client)?,
197 );202 client.clone(),
198 } else {203 select_chain,
199 sc_finality_grandpa::setup_disabled_grandpa(204 block_import,
205 proposer,
200 service.client(),206 network.clone(),
201 &inherent_data_providers,207 inherent_data_providers.clone(),
208 force_authoring,
209 backoff_authoring_blocks,
202 service.network(),210 keystore_container.sync_keystore(),
211 can_author_with,
203 )?;212 )?;
204 }
205213
206 Ok(service)214 // the AURA authoring task is considered essential, i.e. if it
215 // fails we take down the service with it.
216 task_manager.spawn_essential_handle().spawn_blocking("aura", aura);
217 }
218
219 // if the node isn't actively participating in consensus then it doesn't
220 // need a keystore, regardless of which protocol we use below.
221 let keystore = if role.is_authority() {
222 Some(keystore_container.sync_keystore())
223 } else {
224 None
225 };
226
227 let grandpa_config = sc_finality_grandpa::Config {
228 // FIXME #1578 make this available through chainspec
229 gossip_duration: Duration::from_millis(333),
230 justification_period: 512,
231 name: Some(name),
232 observer_enabled: false,
233 keystore,
234 is_authority: role.is_network_authority(),
235 };
236
237 if enable_grandpa {
238 // start the full GRANDPA voter
239 // NOTE: non-authorities could run the GRANDPA observer protocol, but at
240 // this point the full voter should provide better guarantees of block
241 // and vote data availability than the observer. The observer has not
242 // been tested extensively yet and having most nodes in a network run it
243 // could lead to finality stalls.
244 let grandpa_config = sc_finality_grandpa::GrandpaParams {
245 config: grandpa_config,
246 link: grandpa_link,
247 network,
248 telemetry_on_connect: telemetry_connection_notifier.map(|x| x.on_connect_stream()),
249 voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
250 prometheus_registry,
251 shared_voter_state: SharedVoterState::empty(),
252 };
253
254 // the GRANDPA voter task is considered infallible, i.e.
255 // if it fails we take down the service with it.
256 task_manager.spawn_essential_handle().spawn_blocking(
257 "grandpa-voter",
258 sc_finality_grandpa::run_grandpa_voter(grandpa_config)?
259 );
260 }
261
262 network_starter.start_network();
263 Ok(task_manager)
207}264}
208265
209/// Builds a new service for a light client.266/// Builds a new service for a light client.
210pub fn new_light(config: Configuration) -> Result<impl AbstractService, ServiceError> {267pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
211 let inherent_data_providers = InherentDataProviders::new();268 let (client, backend, keystore_container, mut task_manager, on_demand, telemetry_span) =
269 sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
270
271 config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config());
272
273 let select_chain = sc_consensus::LongestChain::new(backend.clone());
274
275 let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
276 config.transaction_pool.clone(),
277 config.prometheus_registry(),
278 task_manager.spawn_handle(),
279 client.clone(),
280 on_demand.clone(),
281 ));
282
283 let (grandpa_block_import, _) = sc_finality_grandpa::block_import(
284 client.clone(),
285 &(client.clone() as Arc<_>),
286 select_chain.clone(),
287 )?;
288
289 let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
290 grandpa_block_import.clone(),
291 client.clone(),
292 );
293
294 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
295 sc_consensus_aura::slot_duration(&*client)?,
296 aura_block_import,
297 Some(Box::new(grandpa_block_import)),
298 client.clone(),
299 InherentDataProviders::new(),
300 &task_manager.spawn_handle(),
301 config.prometheus_registry(),
302 sp_consensus::NeverCanAuthor,
303 )?;
304
305 let (network, network_status_sinks, system_rpc_tx, network_starter) =
306 sc_service::build_network(sc_service::BuildNetworkParams {
307 config: &config,
308 client: client.clone(),
309 transaction_pool: transaction_pool.clone(),
310 spawn_handle: task_manager.spawn_handle(),
311 import_queue,
312 on_demand: Some(on_demand.clone()),
313 block_announce_validator_builder: None,
314 })?;
212315
213 ServiceBuilder::new_light::<Block, RuntimeApi, Executor>(config)?316 if config.offchain_worker.enabled {
317 sc_service::build_offchain_workers(
214 .with_select_chain(|_config, backend| Ok(LongestChain::new(backend.clone())))?318 &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(),
215 .with_transaction_pool(|builder| {
216 let fetcher = builder
217 .fetcher()
218 .ok_or_else(|| "Trying to start light transaction pool without active fetcher")?;319 );
320 }
219321
220 let pool_api =
221 sc_transaction_pool::LightChainApi::new(builder.client().clone(), fetcher.clone());322 sc_service::spawn_tasks(sc_service::SpawnTasksParams {
222 let pool = sc_transaction_pool::BasicPool::with_revalidation_type(323 remote_blockchain: Some(backend.remote_blockchain()),
223 builder.config().transaction_pool.clone(),324 transaction_pool,
224 Arc::new(pool_api),325 task_manager: &mut task_manager,
225 builder.prometheus_registry(),326 on_demand: Some(on_demand),
226 sc_transaction_pool::RevalidationType::Light,327 rpc_extensions_builder: Box::new(|_, _| ()),
227 );
228 Ok(pool)
229 })?
230 .with_import_queue_and_fprb(
231 |_config,328 config,
232 client,329 client,
233 backend,
234 fetcher,
235 _select_chain,
236 _tx_pool,
237 spawn_task_handle,
238 prometheus_registry| {
239 let fetch_checker = fetcher
240 .map(|fetcher| fetcher.checker().clone())
241 .ok_or_else(|| {
242 "Trying to start light import queue without active fetch checker"
243 })?;
244 let grandpa_block_import = sc_finality_grandpa::light_block_import(330 keystore: keystore_container.sync_keystore(),
245 client.clone(),
246 backend,331 backend,
247 &(client.clone() as Arc<_>),332 network,
248 Arc::new(fetch_checker),333 network_status_sinks,
249 )?;334 system_rpc_tx,
250 let finality_proof_import = grandpa_block_import.clone();335 telemetry_span,
251 let finality_proof_request_builder =
252 finality_proof_import.create_finality_proof_request_builder();336 })?;
253337
254 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(
255 sc_consensus_aura::slot_duration(&*client)?,
256 grandpa_block_import,
257 None,
258 Some(Box::new(finality_proof_import)),
259 client,
260 inherent_data_providers.clone(),338 network_starter.start_network();
261 spawn_task_handle,
262 prometheus_registry,
263 )?;
264339
265 Ok((import_queue, finality_proof_request_builder))340 Ok(task_manager)
266 },
267 )?
268 .with_finality_proof_provider(|client, backend| {
269 // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider
270 let provider = client as Arc<dyn StorageAndProofProvider<_, _>>;
271 Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)
272 })?
273 .build_light()
274}341}
275342
modifiedpallets/nft/Cargo.tomldiffbeforeafterboth
1[package]
2authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
3description = 'FRAME pallet nft'
4edition = '2018'
5homepage = 'https://substrate.io'
6license = 'Unlicense'
7name = 'pallet-nft'
8repository = 'https://github.com/substrate-developer-hub/nft/'
9version = '2.1.0'
10
11[package.metadata.docs.rs]
12targets = ['x86_64-unknown-linux-gnu']
13
14# alias "parity-scale-code" to "codec"
1[dependencies.codec]15[dependencies.codec]
2default-features = false16default-features = false
3features = ['derive']17features = ['derive']
4package = 'parity-scale-codec'18package = 'parity-scale-codec'
5version = '1.3.0'19version = '1.3.6'
620
7[dependencies.frame-support]21[dependencies.frame-support]
8default-features = false22default-features = false
9git = 'https://github.com/usetech-llc/substrate.git'23git = 'https://github.com/usetech-llc/substrate.git'
10branch = 'rc4_ext_dispatch_reenabled'24branch = 'unique'
11version = '2.0.0-rc4'25version = '2.0.1'
1226
13[dependencies.frame-system]27[dependencies.frame-system]
14default-features = false28default-features = false
15git = 'https://github.com/usetech-llc/substrate.git'29git = 'https://github.com/usetech-llc/substrate.git'
16branch = 'rc4_ext_dispatch_reenabled'30branch = 'unique'
17version = '2.0.0-rc4'31version = '2.0.1'
32
18[dev-dependencies.sp-core]33[dev-dependencies.sp-core]
19default-features = false34default-features = false
20git = 'https://github.com/usetech-llc/substrate.git'35git = 'https://github.com/usetech-llc/substrate.git'
21branch = 'rc4_ext_dispatch_reenabled'36branch = 'unique'
22version = '2.0.0-rc4'37version = '2.0.1'
2338
24[dev-dependencies.sp-io]39[dev-dependencies.sp-io]
25default-features = false40default-features = false
26git = 'https://github.com/usetech-llc/substrate.git'41git = 'https://github.com/usetech-llc/substrate.git'
27branch = 'rc4_ext_dispatch_reenabled'42branch = 'unique'
28version = '2.0.0-rc4'43version = '2.0.1'
2944
30[dependencies.sp-runtime]45[dependencies.sp-runtime]
31default-features = false46default-features = false
32git = 'https://github.com/usetech-llc/substrate.git'47git = 'https://github.com/usetech-llc/substrate.git'
33branch = 'rc4_ext_dispatch_reenabled'48branch = 'unique'
34version = '2.0.0-rc4'49version = '2.0.1'
35 50
36[dependencies]51[dependencies]
37# third-party dependencies52# third-party dependencies
41[dependencies.sp-std]56[dependencies.sp-std]
42default-features = false57default-features = false
43git = 'https://github.com/usetech-llc/substrate.git'58git = 'https://github.com/usetech-llc/substrate.git'
44branch = 'rc4_ext_dispatch_reenabled'59branch = 'unique'
45version = '2.0.0-rc4'60version = '2.0.1'
4661
47[dependencies.transaction-payment]62[dependencies.transaction-payment]
48default-features = false63default-features = false
49git = 'https://github.com/usetech-llc/substrate.git'64git = 'https://github.com/usetech-llc/substrate.git'
50package = 'pallet-transaction-payment'65package = 'pallet-transaction-payment'
51branch = 'rc4_ext_dispatch_reenabled'66branch = 'unique'
52version = '2.0.0-rc4'67version = '2.0.1'
5368
69[dependencies.frame-benchmarking]
70version = "2.0.1"
71default-features = false
72git = 'https://github.com/usetech-llc/substrate.git'
73branch = 'unique'
74optional = true
75
76[dependencies.pallet-contracts]
77default-features = false
78git = 'https://github.com/usetech-llc/substrate.git'
54[package]79package = 'pallet-contracts'
55authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']80branch = 'unique'
56description = 'FRAME pallet nft'81version = '2.0.1'
82
83[dependencies.pallet-balances]
57edition = '2018'84default-features = false
58homepage = 'https://substrate.io'85git = 'https://github.com/usetech-llc/substrate.git'
86package = 'pallet-balances'
59license = 'Unlicense'87branch = 'unique'
60name = 'pallet-nft'88version = '2.0.1'
89
90[dependencies.pallet-timestamp]
91default-features = false
61repository = 'https://github.com/substrate-developer-hub/nft/'92git = 'https://github.com/usetech-llc/substrate.git'
93package = 'pallet-timestamp'
94branch = 'unique'
62version = '2.0.0-rc4'95version = '2.0.1'
96
63[package.metadata.docs.rs]97[dependencies.pallet-randomness-collective-flip]
98default-features = false
99git = 'https://github.com/usetech-llc/substrate.git'
100package = 'pallet-randomness-collective-flip'
64targets = ['x86_64-unknown-linux-gnu']101branch = 'unique'
102version = '2.0.1'
65103
66[features]104[features]
67default = ['std']105default = ['std']
70 "serde/std",108 "serde/std",
71 'frame-support/std',109 'frame-support/std',
72 'frame-system/std',110 'frame-system/std',
111 'pallet-balances/std',
73 'sp-runtime/std',112 'pallet-timestamp/std',
113 'pallet-randomness-collective-flip/std',
74 'sp-std/std',114 'sp-std/std',
115 'sp-runtime/std',
116 'frame-benchmarking/std',
75]117]
118runtime-benchmarks = ["frame-benchmarking"]
76119
addedpallets/nft/src/benchmarking.rsdiffbeforeafterboth

no changes

addedpallets/nft/src/default_weights.rsdiffbeforeafterboth

no changes

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
6#![recursion_limit = "1024"]
7
1#![cfg_attr(not(feature = "std"), no_std)]8#![cfg_attr(not(feature = "std"), no_std)]
29
3/// For more guidance on Substrate FRAME, see the example pallet10#[cfg(feature = "std")]
4/// https://github.com/paritytech/substrate/blob/master/frame/example/src/lib.rs11pub use std::*;
12
13#[cfg(feature = "std")]
14pub use serde::*;
15
5use codec::{Decode, Encode};16use codec::{Decode, Encode};
6pub use frame_support::{17pub use frame_support::{
7 construct_runtime, decl_event, decl_module, decl_storage,18 construct_runtime, decl_event, decl_module, decl_storage, decl_error,
8 dispatch::DispatchResult,19 dispatch::DispatchResult,
9 ensure, parameter_types,20 ensure, fail, parameter_types,
10 traits::{21 traits::{
11 Currency, ExistenceRequirement, Get, Imbalance, KeyOwnerProofSystem, OnUnbalanced,22 Currency, ExistenceRequirement, Get, Imbalance, KeyOwnerProofSystem, OnUnbalanced,
12 Randomness, WithdrawReason,23 Randomness, IsSubType,
13 },24 },
14 weights::{25 weights::{
15 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},26 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
16 DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,27 DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,
17 WeightToFeePolynomial,28 WeightToFeePolynomial, DispatchClass,
18 },29 },
19 IsSubType, StorageValue,30 StorageValue,
20};31};
2132
22use frame_system::{self as system, ensure_signed};33use frame_system::{self as system, ensure_signed, ensure_root};
23use sp_runtime::sp_std::prelude::Vec;34use sp_runtime::sp_std::prelude::Vec;
24use sp_runtime::{35use sp_runtime::{
25 traits::{36 traits::{
26 DispatchInfoOf, Dispatchable, PostDispatchInfoOf, SaturatedConversion, Saturating,37 DispatchInfoOf, Dispatchable, PostDispatchInfoOf, Saturating, SaturatedConversion, SignedExtension, Zero,
27 SignedExtension, Zero,
28 },38 },
29 transaction_validity::{39 transaction_validity::{
30 InvalidTransaction, TransactionPriority, TransactionValidity, TransactionValidityError,40 TransactionPriority, InvalidTransaction, TransactionValidity, TransactionValidityError, ValidTransaction,
31 ValidTransaction,
32 },41 },
33 FixedPointOperand, FixedU128,42 FixedPointOperand, FixedU128,
34};43};
35use sp_std::prelude::*;44use sp_runtime::traits::StaticLookup;
45use pallet_contracts::chain_extension::UncheckedFrom;
46use transaction_payment::OnChargeTransaction;
3647
37#[cfg(test)]48#[cfg(test)]
38mod mock;49mod mock;
3950
40#[cfg(test)]51#[cfg(test)]
41mod tests;52mod tests;
4253
54mod default_weights;
55
56pub const MAX_DECIMAL_POINTS: DecimalPoints = 30;
57pub const MAX_REFUNGIBLE_PIECES: u128 = 1_000_000_000_000_000_000_000;
58pub const MAX_SPONSOR_TIMEOUT: u32 = 10_368_000;
59pub const MAX_TOKEN_OWNERSHIP: u32 = 10_000_000;
60
61// Structs
43#[derive(Encode, Decode, Debug, Eq, Clone, PartialEq)]62// #region
63
64pub type CollectionId = u32;
65pub type TokenId = u32;
66pub type DecimalPoints = u8;
67
68#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]
69#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
44pub enum CollectionMode {70pub enum CollectionMode {
45 Invalid,71 Invalid,
46 // custom data size72 NFT,
47 NFT(u32),
48 // decimal points73 // decimal points
49 Fungible(u32),74 Fungible(DecimalPoints),
50 // custom data size and decimal points75 ReFungible,
51 ReFungible(u32, u32),
52}76}
5377
78impl Default for CollectionMode {
79 fn default() -> Self {
80 Self::Invalid
81 }
82}
83
54impl Into<u8> for CollectionMode {84impl Into<u8> for CollectionMode {
55 fn into(self) -> u8 {85 fn into(self) -> u8 {
56 match self {86 match self {
57 CollectionMode::Invalid => 0,87 CollectionMode::Invalid => 0,
58 CollectionMode::NFT(_) => 1,88 CollectionMode::NFT => 1,
59 CollectionMode::Fungible(_) => 2,89 CollectionMode::Fungible(_) => 2,
60 CollectionMode::ReFungible(_, _) => 3,90 CollectionMode::ReFungible => 3,
61 }91 }
62 }92 }
63}93}
6494
65#[derive(Encode, Decode, Debug, Clone, PartialEq)]95#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]
96#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
66pub enum AccessMode {97pub enum AccessMode {
67 Normal,98 Normal,
68 WhiteList,99 WhiteList,
73 }104 }
74}105}
75106
107#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]
108#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
109pub enum SchemaVersion {
110 ImageURL,
111 Unique,
112}
76impl Default for CollectionMode {113impl Default for SchemaVersion {
77 fn default() -> Self {114 fn default() -> Self {
78 Self::Invalid115 Self::ImageURL
79 }116 }
80}117}
81118
82#[derive(Encode, Decode, Default, Clone, PartialEq)]119#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
83#[cfg_attr(feature = "std", derive(Debug))]120#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
84pub struct Ownership<AccountId> {121pub struct Ownership<AccountId> {
85 pub owner: AccountId,122 pub owner: AccountId,
86 pub fraction: u128,123 pub fraction: u128,
87}124}
88125
89#[derive(Encode, Decode, Default, Clone, PartialEq)]126#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
90#[cfg_attr(feature = "std", derive(Debug))]127#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
91pub struct CollectionType<AccountId> {128pub struct CollectionType<AccountId> {
92 pub owner: AccountId,129 pub owner: AccountId,
93 pub mode: CollectionMode,130 pub mode: CollectionMode,
94 pub access: AccessMode,131 pub access: AccessMode,
95 pub decimal_points: u32,132 pub decimal_points: DecimalPoints,
96 pub name: Vec<u16>, // 64 include null escape char133 pub name: Vec<u16>, // 64 include null escape char
97 pub description: Vec<u16>, // 256 include null escape char134 pub description: Vec<u16>, // 256 include null escape char
98 pub token_prefix: Vec<u8>, // 16 include null escape char135 pub token_prefix: Vec<u8>, // 16 include null escape char
99 pub custom_data_size: u32,
100 pub mint_mode: bool,136 pub mint_mode: bool,
101 pub offchain_schema: Vec<u8>,137 pub offchain_schema: Vec<u8>,
138 pub schema_version: SchemaVersion,
102 pub sponsor: AccountId, // Who pays fees. If set to default address, the fees are applied to the transaction sender139 pub sponsor: AccountId, // Who pays fees. If set to default address, the fees are applied to the transaction sender
103 pub unconfirmed_sponsor: AccountId, // Sponsor address that has not yet confirmed sponsorship140 pub sponsor_confirmed: bool, // False if sponsor address has not yet confirmed sponsorship. True otherwise.
141 pub limits: CollectionLimits, // Collection private restrictions
142 pub variable_on_chain_schema: Vec<u8>, //
143 pub const_on_chain_schema: Vec<u8>, //
104}144}
105145
106#[derive(Encode, Decode, Default, Clone, PartialEq)]146#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
107#[cfg_attr(feature = "std", derive(Debug))]
108pub struct CollectionAdminsType<AccountId> {
109 pub admin: AccountId,
110 pub collection_id: u64,
111}
112
113#[derive(Encode, Decode, Default, Clone, PartialEq)]
114#[cfg_attr(feature = "std", derive(Debug))]147#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
115pub struct NftItemType<AccountId> {148pub struct NftItemType<AccountId> {
116 pub collection: u64,
117 pub owner: AccountId,149 pub owner: AccountId,
118 pub data: Vec<u8>,150 pub const_data: Vec<u8>,
151 pub variable_data: Vec<u8>,
119}152}
120153
121#[derive(Encode, Decode, Default, Clone, PartialEq)]154#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
122#[cfg_attr(feature = "std", derive(Debug))]155#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
123pub struct FungibleItemType<AccountId> {156pub struct FungibleItemType {
124 pub collection: u64,
125 pub owner: AccountId,
126 pub value: u128,157 pub value: u128,
127}158}
128159
129#[derive(Encode, Decode, Default, Clone, PartialEq)]160#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
130#[cfg_attr(feature = "std", derive(Debug))]161#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
131pub struct ReFungibleItemType<AccountId> {162pub struct ReFungibleItemType<AccountId> {
132 pub collection: u64,
133 pub owner: Vec<Ownership<AccountId>>,163 pub owner: Vec<Ownership<AccountId>>,
134 pub data: Vec<u8>,164 pub const_data: Vec<u8>,
165 pub variable_data: Vec<u8>,
135}166}
136167
137#[derive(Encode, Decode, Default, Clone, PartialEq)]168// #[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
138#[cfg_attr(feature = "std", derive(Debug))]169// #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
139pub struct ApprovePermissions<AccountId> {170// pub struct VestingItem<AccountId, Moment> {
140 pub approved: AccountId,171// pub sender: AccountId,
141 pub amount: u64,172// pub recipient: AccountId,
173// pub collection_id: CollectionId,
174// pub item_id: TokenId,
175// pub amount: u64,
176// pub vesting_date: Moment,
177// }
178
179#[derive(Encode, Decode, Debug, Clone, PartialEq)]
180#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
181pub struct CollectionLimits {
182 pub account_token_ownership_limit: u32,
183 pub sponsored_data_size: u32,
184 pub token_limit: u32,
185
186 // Timeouts for item types in passed blocks
187 pub sponsor_transfer_timeout: u32,
188 pub owner_can_transfer: bool,
189 pub owner_can_destroy: bool,
142}190}
143191
144#[derive(Encode, Decode, Default, Clone, PartialEq)]192impl Default for CollectionLimits {
145#[cfg_attr(feature = "std", derive(Debug))]193 fn default() -> CollectionLimits {
146pub struct VestingItem<AccountId, Moment> {194 CollectionLimits {
147 pub sender: AccountId,195 account_token_ownership_limit: 10_000_000,
148 pub recipient: AccountId,196 token_limit: u32::max_value(),
149 pub collection_id: u64,197 sponsored_data_size: u32::max_value(),
150 pub item_id: u64,198 sponsor_transfer_timeout: 14400,
151 pub amount: u64,199 owner_can_transfer: true,
152 pub vesting_date: Moment,200 owner_can_destroy: true
201 }
202 }
153}203}
154204
205#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
206#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
155pub trait Trait: system::Trait {207pub struct ChainLimits {
208 pub collection_numbers_limit: u32,
209 pub account_token_ownership_limit: u32,
210 pub collections_admins_limit: u64,
156 type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;211 pub custom_data_limit: u32,
212
213 // Timeouts for item types in passed blocks
214 pub nft_sponsor_transfer_timeout: u32,
215 pub fungible_sponsor_transfer_timeout: u32,
216 pub refungible_sponsor_transfer_timeout: u32,
217
218 // Schema limits
219 pub offchain_schema_limit: u32,
220 pub variable_on_chain_schema_limit: u32,
221 pub const_on_chain_schema_limit: u32,
157}222}
158223
224pub trait WeightInfo {
225 fn create_collection() -> Weight;
226 fn destroy_collection() -> Weight;
227 fn add_to_white_list() -> Weight;
228 fn remove_from_white_list() -> Weight;
229 fn set_public_access_mode() -> Weight;
230 fn set_mint_permission() -> Weight;
231 fn change_collection_owner() -> Weight;
232 fn add_collection_admin() -> Weight;
233 fn remove_collection_admin() -> Weight;
234 fn set_collection_sponsor() -> Weight;
235 fn confirm_sponsorship() -> Weight;
236 fn remove_collection_sponsor() -> Weight;
237 fn create_item(s: usize) -> Weight;
238 fn burn_item() -> Weight;
239 fn transfer() -> Weight;
240 fn approve() -> Weight;
241 fn transfer_from() -> Weight;
242 fn set_offchain_schema() -> Weight;
243 fn set_const_on_chain_schema() -> Weight;
244 fn set_variable_on_chain_schema() -> Weight;
245 fn set_variable_meta_data() -> Weight;
246 fn enable_contract_sponsoring() -> Weight;
247 fn set_schema_version() -> Weight;
248 fn set_chain_limits() -> Weight;
249 fn set_contract_sponsoring_rate_limit() -> Weight;
250 fn toggle_contract_white_list() -> Weight;
251 fn add_to_contract_white_list() -> Weight;
252 fn remove_from_contract_white_list() -> Weight;
253 fn set_collection_limits() -> Weight;
254}
255
256#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
257#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
258pub struct CreateNftData {
259 pub const_data: Vec<u8>,
260 pub variable_data: Vec<u8>,
261}
262
263#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
264#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
265pub struct CreateFungibleData {
266 pub value: u128,
267}
268
269#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
270#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
271pub struct CreateReFungibleData {
272 pub const_data: Vec<u8>,
273 pub variable_data: Vec<u8>,
274 pub pieces: u128,
275}
276
277#[derive(Encode, Decode, Debug, Clone, PartialEq)]
278#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
279pub enum CreateItemData {
280 NFT(CreateNftData),
281 Fungible(CreateFungibleData),
282 ReFungible(CreateReFungibleData),
283}
284
285impl CreateItemData {
286 pub fn len(&self) -> usize {
287 let len = match self {
288 CreateItemData::NFT(data) => data.variable_data.len() + data.const_data.len(),
289 CreateItemData::ReFungible(data) => data.variable_data.len() + data.const_data.len(),
290 _ => 0
291 };
292
293 return len;
294 }
295}
296
297impl From<CreateNftData> for CreateItemData {
298 fn from(item: CreateNftData) -> Self {
299 CreateItemData::NFT(item)
300 }
301}
302
303impl From<CreateReFungibleData> for CreateItemData {
304 fn from(item: CreateReFungibleData) -> Self {
305 CreateItemData::ReFungible(item)
306 }
307}
308
309impl From<CreateFungibleData> for CreateItemData {
310 fn from(item: CreateFungibleData) -> Self {
311 CreateItemData::Fungible(item)
312 }
313}
314
315
316decl_error! {
317 /// Error for non-fungible-token module.
318 pub enum Error for Module<T: Config> {
319 /// Total collections bound exceeded.
320 TotalCollectionsLimitExceeded,
321 /// Decimal_points parameter must be lower than MAX_DECIMAL_POINTS constant, currently it is 30.
322 CollectionDecimalPointLimitExceeded,
323 /// Collection name can not be longer than 63 char.
324 CollectionNameLimitExceeded,
325 /// Collection description can not be longer than 255 char.
326 CollectionDescriptionLimitExceeded,
327 /// Token prefix can not be longer than 15 char.
328 CollectionTokenPrefixLimitExceeded,
329 /// This collection does not exist.
330 CollectionNotFound,
331 /// Item not exists.
332 TokenNotFound,
333 /// Admin not found
334 AdminNotFound,
335 /// Arithmetic calculation overflow.
336 NumOverflow,
337 /// Account already has admin role.
338 AlreadyAdmin,
339 /// You do not own this collection.
340 NoPermission,
341 /// This address is not set as sponsor, use setCollectionSponsor first.
342 ConfirmUnsetSponsorFail,
343 /// Collection is not in mint mode.
344 PublicMintingNotAllowed,
345 /// Sender parameter and item owner must be equal.
346 MustBeTokenOwner,
347 /// Item balance not enough.
348 TokenValueTooLow,
349 /// Size of item is too large.
350 NftSizeLimitExceeded,
351 /// No approve found
352 ApproveNotFound,
353 /// Requested value more than approved.
354 TokenValueNotEnough,
355 /// Only approved addresses can call this method.
356 ApproveRequired,
357 /// Address is not in white list.
358 AddresNotInWhiteList,
359 /// Number of collection admins bound exceeded.
360 CollectionAdminsLimitExceeded,
361 /// Owned tokens by a single address bound exceeded.
362 AddressOwnershipLimitExceeded,
363 /// Length of items properties must be greater than 0.
364 EmptyArgument,
365 /// const_data exceeded data limit.
366 TokenConstDataLimitExceeded,
367 /// variable_data exceeded data limit.
368 TokenVariableDataLimitExceeded,
369 /// Not NFT item data used to mint in NFT collection.
370 NotNftDataUsedToMintNftCollectionToken,
371 /// Not Fungible item data used to mint in Fungible collection.
372 NotFungibleDataUsedToMintFungibleCollectionToken,
373 /// Not Re Fungible item data used to mint in Re Fungible collection.
374 NotReFungibleDataUsedToMintReFungibleCollectionToken,
375 /// Unexpected collection type.
376 UnexpectedCollectionType,
377 /// Can't store metadata in fungible tokens.
378 CantStoreMetadataInFungibleTokens,
379 /// Collection token limit exceeded
380 CollectionTokenLimitExceeded,
381 /// Account token limit exceeded per collection
382 AccountTokenLimitExceeded,
383 /// Collection limit bounds per collection exceeded
384 CollectionLimitBoundsExceeded,
385 /// Schema data size limit bound exceeded
386 SchemaDataLimitExceeded,
387 /// Maximum refungibility exceeded
388 WrongRefungiblePieces
389 }
390}
391
392pub trait Config: system::Config + Sized + transaction_payment::Config + pallet_contracts::Config {
393 type Event: From<Event<Self>> + Into<<Self as system::Config>::Event>;
394
395 /// Weight information for extrinsics in this pallet.
396 type WeightInfo: WeightInfo;
397}
398
399#[cfg(feature = "runtime-benchmarks")]
400mod benchmarking;
401
402// #endregion
403
159decl_storage! {404decl_storage! {
160 trait Store for Module<T: Trait> as Nft {405 trait Store for Module<T: Config> as Nft {
161406
162 // Private members407 // Private members
163 NextCollectionID: u64;408 NextCollectionID: CollectionId;
164 CreatedCollectionCount: u64;409 CreatedCollectionCount: u32;
165 ChainVersion: u64;410 ChainVersion: u64;
166 ItemListIndex: map hasher(blake2_128_concat) u64 => u64;411 ItemListIndex: map hasher(identity) CollectionId => TokenId;
167412
168 pub Collection get(fn collection): map hasher(identity) u64 => CollectionType<T::AccountId>;413 // Chain limits struct
169 pub AdminList get(fn admin_list_collection): map hasher(identity) u64 => Vec<T::AccountId>;414 pub ChainLimit get(fn chain_limit) config(): ChainLimits;
170 pub WhiteList get(fn white_list): map hasher(identity) u64 => Vec<T::AccountId>;
171415
416 // Bound counters
417 CollectionCount: u32;
418 pub AccountItemCount get(fn account_item_count): map hasher(twox_64_concat) T::AccountId => u32;
419
420 // Basic collections
421 pub Collection get(fn collection) config(): map hasher(identity) CollectionId => CollectionType<T::AccountId>;
422 pub AdminList get(fn admin_list_collection): map hasher(identity) CollectionId => Vec<T::AccountId>;
423 pub WhiteList get(fn white_list): double_map hasher(identity) CollectionId, hasher(twox_64_concat) T::AccountId => bool;
424
172 /// Balance owner per collection map425 /// Balance owner per collection map
173 pub Balance get(fn balance_count): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) T::AccountId => u64;426 pub Balance get(fn balance_count): double_map hasher(identity) CollectionId, hasher(twox_64_concat) T::AccountId => u128;
174427
175 /// second parameter: item id + owner account id428 /// second parameter: item id + owner account id + spender account id
176 pub ApprovedList get(fn approved): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) (u64, T::AccountId) => Vec<ApprovePermissions<T::AccountId>>;429 pub Allowances get(fn approved): double_map hasher(identity) CollectionId, hasher(twox_64_concat) (TokenId, T::AccountId, T::AccountId) => u128;
177430
178 /// Item collections431 /// Item collections
179 pub NftItemList get(fn nft_item_id): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) u64 => NftItemType<T::AccountId>;432 pub NftItemList get(fn nft_item_id) config(): double_map hasher(identity) CollectionId, hasher(identity) TokenId => NftItemType<T::AccountId>;
180 pub FungibleItemList get(fn fungible_item_id): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) u64 => FungibleItemType<T::AccountId>;433 pub FungibleItemList get(fn fungible_item_id) config(): double_map hasher(identity) CollectionId, hasher(twox_64_concat) T::AccountId => FungibleItemType;
181 pub ReFungibleItemList get(fn refungible_item_id): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) u64 => ReFungibleItemType<T::AccountId>;434 pub ReFungibleItemList get(fn refungible_item_id) config(): double_map hasher(identity) CollectionId, hasher(identity) TokenId => ReFungibleItemType<T::AccountId>;
182435
183 /// Index list436 /// Index list
184 pub AddressTokens get(fn address_tokens): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) T::AccountId => Vec<u64>;437 pub AddressTokens get(fn address_tokens): double_map hasher(identity) CollectionId, hasher(twox_64_concat) T::AccountId => Vec<TokenId>;
185438
186 // Sponsorship439 /// Tokens transfer baskets
187 pub ContractSponsor get(fn contract_sponsor): map hasher(identity) T::AccountId => T::AccountId;440 pub CreateItemBasket get(fn create_item_basket): map hasher(twox_64_concat) (CollectionId, T::AccountId) => T::BlockNumber;
441 pub NftTransferBasket get(fn nft_transfer_basket): double_map hasher(identity) CollectionId, hasher(identity) TokenId => T::BlockNumber;
442 pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(identity) CollectionId, hasher(twox_64_concat) T::AccountId => T::BlockNumber;
443 pub ReFungibleTransferBasket get(fn refungible_transfer_basket): double_map hasher(identity) CollectionId, hasher(identity) TokenId => T::BlockNumber;
444
445 // Contract Sponsorship and Ownership
446 pub ContractOwner get(fn contract_owner): map hasher(twox_64_concat) T::AccountId => T::AccountId;
188 pub UnconfirmedContractSponsor get(fn unconfirmed_contract_sponsor): map hasher(identity) T::AccountId => T::AccountId;447 pub ContractSelfSponsoring get(fn contract_self_sponsoring): map hasher(twox_64_concat) T::AccountId => bool;
448 pub ContractSponsorBasket get(fn contract_sponsor_basket): map hasher(twox_64_concat) (T::AccountId, T::AccountId) => T::BlockNumber;
449 pub ContractSponsoringRateLimit get(fn contract_sponsoring_rate_limit): map hasher(twox_64_concat) T::AccountId => T::BlockNumber;
450 pub ContractWhiteListEnabled get(fn contract_white_list_enabled): map hasher(twox_64_concat) T::AccountId => bool;
451 pub ContractWhiteList get(fn contract_white_list): double_map hasher(twox_64_concat) T::AccountId, hasher(twox_64_concat) T::AccountId => bool;
189 }452 }
453 add_extra_genesis {
454 build(|config: &GenesisConfig<T>| {
455 // Modification of storage
456 for (_num, _c) in &config.collection {
457 <Module<T>>::init_collection(_c);
458 }
459
460 for (_num, _c, _i) in &config.nft_item_id {
461 <Module<T>>::init_nft_token(*_c, _i);
462 }
463
464 for (collection_id, account_id, fungible_item) in &config.fungible_item_id {
465 <Module<T>>::init_fungible_token(*collection_id, account_id, fungible_item);
466 }
467
468 for (_num, _c, _i) in &config.refungible_item_id {
469 <Module<T>>::init_refungible_token(*_c, _i);
470 }
471 })
472 }
190}473}
191474
192decl_event!(475decl_event!(
193 pub enum Event<T>476 pub enum Event<T>
194 where477 where
195 AccountId = <T as system::Trait>::AccountId,478 AccountId = <T as system::Config>::AccountId,
196 {479 {
197 Created(u64, u8, AccountId),480 /// New collection was created
481 ///
482 /// # Arguments
483 ///
484 /// * collection_id: Globally unique identifier of newly created collection.
485 ///
486 /// * mode: [CollectionMode] converted into u8.
487 ///
488 /// * account_id: Collection owner.
489 Created(CollectionId, u8, AccountId),
490
198 ItemCreated(u64, u64),491 /// New item was created.
492 ///
493 /// # Arguments
494 ///
495 /// * collection_id: Id of the collection where item was created.
496 ///
497 /// * item_id: Id of an item. Unique within the collection.
498 ///
499 /// * recipient: Owner of newly created item
500 ItemCreated(CollectionId, TokenId, AccountId),
501
199 ItemDestroyed(u64, u64),502 /// Collection item was burned.
503 ///
504 /// # Arguments
505 ///
506 /// collection_id.
507 ///
508 /// item_id: Identifier of burned NFT.
509 ItemDestroyed(CollectionId, TokenId),
510
511 /// Item was transferred
512 ///
513 /// * collection_id: Id of collection to which item is belong
514 ///
515 /// * item_id: Id of an item
516 ///
517 /// * sender: Original owner of item
518 ///
519 /// * recipient: New owner of item
520 ///
521 /// * amount: Always 1 for NFT
522 Transfer(CollectionId, TokenId, AccountId, AccountId, u128),
200 }523 }
201);524);
202525
203decl_module! {526decl_module! {
204 pub struct Module<T: Trait> for enum Call where origin: T::Origin {527 pub struct Module<T: Config> for enum Call
205528 where
529 origin: T::Origin
530 {
206 fn deposit_event() = default;531 fn deposit_event() = default;
532 type Error = Error<T>;
207533
208 fn on_initialize(now: T::BlockNumber) -> Weight {534 fn on_initialize(now: T::BlockNumber) -> Weight {
209535
217 0543 0
218 }544 }
219545
220 // Create collection of NFT with given parameters546 /// This method creates a Collection of NFTs. Each Token may have multiple properties encoded as an array of bytes of certain length. The initial owner and admin of the collection are set to the address that signed the transaction. Both addresses can be changed later.
547 ///
548 /// # Permissions
549 ///
550 /// * Anyone.
551 ///
552 /// # Arguments
553 ///
554 /// * collection_name: UTF-16 string with collection name (limit 64 characters), will be stored as zero-terminated.
221 //555 ///
222 // @param customDataSz size of custom data in each collection item556 /// * collection_description: UTF-16 string with collection description (limit 256 characters), will be stored as zero-terminated.
557 ///
558 /// * token_prefix: UTF-8 string with token prefix.
559 ///
560 /// * mode: [CollectionMode] collection type and type dependent data.
223 // returns collection ID561 // returns collection ID
224 #[weight = 0]562 #[weight = <T as Config>::WeightInfo::create_collection()]
225 pub fn create_collection(origin,563 pub fn create_collection(origin,
226 collection_name: Vec<u16>,564 collection_name: Vec<u16>,
227 collection_description: Vec<u16>,565 collection_description: Vec<u16>,
230568
231 // Anyone can create a collection569 // Anyone can create a collection
232 let who = ensure_signed(origin)?;570 let who = ensure_signed(origin)?;
233 let custom_data_size = match mode {
234 CollectionMode::NFT(size) => size,
235 CollectionMode::ReFungible(size, _) => size,
236 _ => 0
237 };
238571
239 let decimal_points = match mode {572 let decimal_points = match mode {
240 CollectionMode::Fungible(points) => points,573 CollectionMode::Fungible(points) => points,
241 CollectionMode::ReFungible(_, points) => points,
242 _ => 0574 _ => 0
243 };575 };
244576
577 // bound Total number of collections
578 ensure!(CollectionCount::get() < ChainLimit::get().collection_numbers_limit, Error::<T>::TotalCollectionsLimitExceeded);
579
245 // check params580 // check params
246 ensure!(decimal_points <= 4, "decimal_points parameter must be lower than 4");581 ensure!(decimal_points <= MAX_DECIMAL_POINTS, Error::<T>::CollectionDecimalPointLimitExceeded);
582 ensure!(collection_name.len() <= 64, Error::<T>::CollectionNameLimitExceeded);
583 ensure!(collection_description.len() <= 256, Error::<T>::CollectionDescriptionLimitExceeded);
584 ensure!(token_prefix.len() <= 16, Error::<T>::CollectionTokenPrefixLimitExceeded);
247585
248 let mut name = collection_name.to_vec();
249 name.push(0);
250 ensure!(name.len() <= 64, "Collection name can not be longer than 63 char");
251
252 let mut description = collection_description.to_vec();
253 description.push(0);
254 ensure!(name.len() <= 256, "Collection description can not be longer than 255 char");
255
256 let mut prefix = token_prefix.to_vec();
257 prefix.push(0);
258 ensure!(prefix.len() <= 16, "Token prefix can not be longer than 15 char");
259
260 // Generate next collection ID586 // Generate next collection ID
261 let next_id = CreatedCollectionCount::get()587 let next_id = CreatedCollectionCount::get()
262 .checked_add(1)588 .checked_add(1)
263 .expect("collection id error");589 .ok_or(Error::<T>::NumOverflow)?;
264590
591 // bound counter
592 let total = CollectionCount::get()
593 .checked_add(1)
594 .ok_or(Error::<T>::NumOverflow)?;
595
265 CreatedCollectionCount::put(next_id);596 CreatedCollectionCount::put(next_id);
597 CollectionCount::put(total);
266598
267 // Create new collection599 // Create new collection
268 let new_collection = CollectionType {600 let new_collection = CollectionType {
269 owner: who.clone(),601 owner: who.clone(),
270 name: name,602 name: collection_name,
271 mode: mode.clone(),603 mode: mode.clone(),
272 mint_mode: false,604 mint_mode: false,
273 access: AccessMode::Normal,605 access: AccessMode::Normal,
274 description: description,606 description: collection_description,
275 decimal_points: decimal_points,607 decimal_points: decimal_points,
276 token_prefix: prefix,608 token_prefix: token_prefix,
277 offchain_schema: Vec::new(),609 offchain_schema: Vec::new(),
278 custom_data_size: custom_data_size,610 schema_version: SchemaVersion::ImageURL,
279 sponsor: T::AccountId::default(),611 sponsor: T::AccountId::default(),
280 unconfirmed_sponsor: T::AccountId::default(),612 sponsor_confirmed: false,
613 variable_on_chain_schema: Vec::new(),
614 const_on_chain_schema: Vec::new(),
615 limits: CollectionLimits::default()
281 };616 };
282617
283 // Add new collection to map618 // Add new collection to map
289 Ok(())624 Ok(())
290 }625 }
291626
292 #[weight = 0]627 /// **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.
628 ///
629 /// # Permissions
630 ///
631 /// * Collection Owner.
632 ///
633 /// # Arguments
634 ///
635 /// * collection_id: collection to destroy.
636 #[weight = <T as Config>::WeightInfo::destroy_collection()]
293 pub fn destroy_collection(origin, collection_id: u64) -> DispatchResult {637 pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {
294638
295 let sender = ensure_signed(origin)?;639 let sender = ensure_signed(origin)?;
296 Self::check_owner_permissions(collection_id, sender)?;640 Self::check_owner_permissions(collection_id, sender)?;
297641
298 // TODO Items remove
299 <AddressTokens<T>>::remove_prefix(collection_id);642 <AddressTokens<T>>::remove_prefix(collection_id);
300 <ApprovedList<T>>::remove_prefix(collection_id);643 <Allowances<T>>::remove_prefix(collection_id);
301 <Balance<T>>::remove_prefix(collection_id);644 <Balance<T>>::remove_prefix(collection_id);
302 <ItemListIndex>::remove(collection_id);645 <ItemListIndex>::remove(collection_id);
303 <AdminList<T>>::remove(collection_id);646 <AdminList<T>>::remove(collection_id);
304 <Collection<T>>::remove(collection_id);647 <Collection<T>>::remove(collection_id);
305 <WhiteList<T>>::remove(collection_id);648 <WhiteList<T>>::remove_prefix(collection_id);
306649
650 <NftItemList<T>>::remove_prefix(collection_id);
651 <FungibleItemList<T>>::remove_prefix(collection_id);
652 <ReFungibleItemList<T>>::remove_prefix(collection_id);
653
654 <NftTransferBasket<T>>::remove_prefix(collection_id);
655 <FungibleTransferBasket<T>>::remove_prefix(collection_id);
656 <ReFungibleTransferBasket<T>>::remove_prefix(collection_id);
657
658 if CollectionCount::get() > 0
659 {
660 // bound couter
661 let total = CollectionCount::get()
662 .checked_sub(1)
663 .ok_or(Error::<T>::NumOverflow)?;
664
665 CollectionCount::put(total);
666 }
667
307 Ok(())668 Ok(())
308 }669 }
309670
310 #[weight = 0]671 /// Add an address to white list.
672 ///
673 /// # Permissions
674 ///
675 /// * Collection Owner
676 /// * Collection Admin
677 ///
678 /// # Arguments
679 ///
680 /// * collection_id.
681 ///
682 /// * address.
683 #[weight = <T as Config>::WeightInfo::add_to_white_list()]
311 pub fn add_to_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{684 pub fn add_to_white_list(origin, collection_id: CollectionId, address: T::AccountId) -> DispatchResult{
312685
313 let sender = ensure_signed(origin)?;686 let sender = ensure_signed(origin)?;
314 Self::check_owner_or_admin_permissions(collection_id, sender)?;687 Self::check_owner_or_admin_permissions(collection_id, sender)?;
315688
316 let mut white_list_collection: Vec<T::AccountId>;689 <WhiteList<T>>::insert(collection_id, address, true);
317 if <WhiteList<T>>::contains_key(collection_id) {
318 white_list_collection = <WhiteList<T>>::get(collection_id);
319 if !white_list_collection.contains(&address.clone())
320 {
321 white_list_collection.push(address.clone());
322 }690
323 }
324 else {
325 white_list_collection = Vec::new();
326 white_list_collection.push(address.clone());
327 }
328
329 <WhiteList<T>>::insert(collection_id, white_list_collection);
330 Ok(())691 Ok(())
331 }692 }
332693
333 #[weight = 0]694 /// Remove an address from white list.
695 ///
696 /// # Permissions
697 ///
698 /// * Collection Owner
699 /// * Collection Admin
700 ///
701 /// # Arguments
702 ///
703 /// * collection_id.
704 ///
705 /// * address.
706 #[weight = <T as Config>::WeightInfo::remove_from_white_list()]
334 pub fn remove_from_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{707 pub fn remove_from_white_list(origin, collection_id: CollectionId, address: T::AccountId) -> DispatchResult{
335708
336 let sender = ensure_signed(origin)?;709 let sender = ensure_signed(origin)?;
337 Self::check_owner_or_admin_permissions(collection_id, sender)?;710 Self::check_owner_or_admin_permissions(collection_id, sender)?;
338711
339 if <WhiteList<T>>::contains_key(collection_id) {712 <WhiteList<T>>::remove(collection_id, address);
340 let mut white_list_collection = <WhiteList<T>>::get(collection_id);
341 if white_list_collection.contains(&address.clone())
342 {
343 white_list_collection.retain(|i| *i != address.clone());
344 <WhiteList<T>>::insert(collection_id, white_list_collection);
345 }
346 }
347713
348 Ok(())714 Ok(())
349 }715 }
350716
351 #[weight = 0]717 /// Toggle between normal and white list access for the methods with access for `Anyone`.
718 ///
719 /// # Permissions
720 ///
721 /// * Collection Owner.
722 ///
723 /// # Arguments
724 ///
725 /// * collection_id.
726 ///
727 /// * mode: [AccessMode]
728 #[weight = <T as Config>::WeightInfo::set_public_access_mode()]
352 pub fn set_public_access_mode(origin, collection_id: u64, mode: AccessMode) -> DispatchResult729 pub fn set_public_access_mode(origin, collection_id: CollectionId, mode: AccessMode) -> DispatchResult
353 {730 {
354 let sender = ensure_signed(origin)?;731 let sender = ensure_signed(origin)?;
355732
361 Ok(())738 Ok(())
362 }739 }
363740
364 #[weight = 0]741 /// Allows Anyone to create tokens if:
742 /// * White List is enabled, and
743 /// * Address is added to white list, and
744 /// * This method was called with True parameter
745 ///
746 /// # Permissions
747 /// * Collection Owner
748 ///
749 /// # Arguments
750 ///
751 /// * collection_id.
752 ///
753 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.
754 #[weight = <T as Config>::WeightInfo::set_mint_permission()]
365 pub fn set_mint_permission(origin, collection_id: u64, mint_permission: bool) -> DispatchResult755 pub fn set_mint_permission(origin, collection_id: CollectionId, mint_permission: bool) -> DispatchResult
366 {756 {
367 let sender = ensure_signed(origin)?;757 let sender = ensure_signed(origin)?;
368758
374 Ok(())764 Ok(())
375 }765 }
376766
377 #[weight = 0]767 /// Change the owner of the collection.
768 ///
769 /// # Permissions
770 ///
771 /// * Collection Owner.
772 ///
773 /// # Arguments
774 ///
775 /// * collection_id.
776 ///
777 /// * new_owner.
778 #[weight = <T as Config>::WeightInfo::change_collection_owner()]
378 pub fn change_collection_owner(origin, collection_id: u64, new_owner: T::AccountId) -> DispatchResult {779 pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {
379780
380 let sender = ensure_signed(origin)?;781 let sender = ensure_signed(origin)?;
381 Self::check_owner_permissions(collection_id, sender)?;782 Self::check_owner_permissions(collection_id, sender)?;
386 Ok(())787 Ok(())
387 }788 }
388789
389 #[weight = 0]790 /// Adds an admin of the Collection.
791 /// NFT Collection can be controlled by multiple admin addresses (some which can also be servers, for example). Admins can issue and burn NFTs, as well as add and remove other admins, but cannot change NFT or Collection ownership.
792 ///
793 /// # Permissions
794 ///
795 /// * Collection Owner.
796 /// * Collection Admin.
797 ///
798 /// # Arguments
799 ///
800 /// * collection_id: ID of the Collection to add admin for.
801 ///
802 /// * new_admin_id: Address of new admin to add.
803 #[weight = <T as Config>::WeightInfo::add_collection_admin()]
390 pub fn add_collection_admin(origin, collection_id: u64, new_admin_id: T::AccountId) -> DispatchResult {804 pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::AccountId) -> DispatchResult {
391805
392 let sender = ensure_signed(origin)?;806 let sender = ensure_signed(origin)?;
393 Self::check_owner_or_admin_permissions(collection_id, sender)?;807 Self::check_owner_or_admin_permissions(collection_id, sender)?;
396 if <AdminList<T>>::contains_key(collection_id)810 if <AdminList<T>>::contains_key(collection_id)
397 {811 {
398 admin_arr = <AdminList<T>>::get(collection_id);812 admin_arr = <AdminList<T>>::get(collection_id);
399 ensure!(!admin_arr.contains(&new_admin_id), "Account already has admin role");813 ensure!(!admin_arr.contains(&new_admin_id), Error::<T>::AlreadyAdmin);
400 }814 }
401815
816 // Number of collection admins
817 ensure!((admin_arr.len() as u64) < ChainLimit::get().collections_admins_limit, Error::<T>::CollectionAdminsLimitExceeded);
818
402 admin_arr.push(new_admin_id);819 admin_arr.push(new_admin_id);
403 <AdminList<T>>::insert(collection_id, admin_arr);820 <AdminList<T>>::insert(collection_id, admin_arr);
404821
405 Ok(())822 Ok(())
406 }823 }
407824
408 #[weight = 0]825 /// Remove admin address of the Collection. An admin address can remove itself. List of admins may become empty, in which case only Collection Owner will be able to add an Admin.
826 ///
827 /// # Permissions
828 ///
829 /// * Collection Owner.
830 /// * Collection Admin.
831 ///
832 /// # Arguments
833 ///
834 /// * collection_id: ID of the Collection to remove admin for.
835 ///
836 /// * account_id: Address of admin to remove.
837 #[weight = <T as Config>::WeightInfo::remove_collection_admin()]
409 pub fn remove_collection_admin(origin, collection_id: u64, account_id: T::AccountId) -> DispatchResult {838 pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::AccountId) -> DispatchResult {
410839
411 let sender = ensure_signed(origin)?;840 let sender = ensure_signed(origin)?;
412 Self::check_owner_or_admin_permissions(collection_id, sender)?;841 Self::check_owner_or_admin_permissions(collection_id, sender)?;
842 ensure!(<AdminList<T>>::contains_key(collection_id), Error::<T>::AdminNotFound);
413843
414 if <AdminList<T>>::contains_key(collection_id)844 let mut admin_arr = <AdminList<T>>::get(collection_id);
415 {
416 let mut admin_arr = <AdminList<T>>::get(collection_id);
417 admin_arr.retain(|i| *i != account_id);845 admin_arr.retain(|i| *i != account_id);
418 <AdminList<T>>::insert(collection_id, admin_arr);846 <AdminList<T>>::insert(collection_id, admin_arr);
419 }
420847
421 Ok(())848 Ok(())
422 }849 }
423850
424 #[weight = 0]851 /// # Permissions
852 ///
853 /// * Collection Owner
854 ///
855 /// # Arguments
856 ///
857 /// * collection_id.
858 ///
859 /// * new_sponsor.
860 #[weight = <T as Config>::WeightInfo::set_collection_sponsor()]
425 pub fn set_collection_sponsor(origin, collection_id: u64, new_sponsor: T::AccountId) -> DispatchResult {861 pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {
426862
427 let sender = ensure_signed(origin)?;863 let sender = ensure_signed(origin)?;
428 ensure!(<Collection<T>>::contains_key(collection_id), "This collection does not exist");864 ensure!(<Collection<T>>::contains_key(collection_id), Error::<T>::CollectionNotFound);
429865
430 let mut target_collection = <Collection<T>>::get(collection_id);866 let mut target_collection = <Collection<T>>::get(collection_id);
431 ensure!(sender == target_collection.owner, "You do not own this collection");867 ensure!(sender == target_collection.owner, Error::<T>::NoPermission);
432868
433 target_collection.unconfirmed_sponsor = new_sponsor;869 target_collection.sponsor = new_sponsor;
870 target_collection.sponsor_confirmed = false;
434 <Collection<T>>::insert(collection_id, target_collection);871 <Collection<T>>::insert(collection_id, target_collection);
435872
436 Ok(())873 Ok(())
437 }874 }
438875
439 #[weight = 0]876 /// # Permissions
877 ///
878 /// * Sponsor.
879 ///
880 /// # Arguments
881 ///
882 /// * collection_id.
883 #[weight = <T as Config>::WeightInfo::confirm_sponsorship()]
440 pub fn confirm_sponsorship(origin, collection_id: u64) -> DispatchResult {884 pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {
441885
442 let sender = ensure_signed(origin)?;886 let sender = ensure_signed(origin)?;
443 ensure!(<Collection<T>>::contains_key(collection_id), "This collection does not exist");887 ensure!(<Collection<T>>::contains_key(collection_id), Error::<T>::CollectionNotFound);
444888
445 let mut target_collection = <Collection<T>>::get(collection_id);889 let mut target_collection = <Collection<T>>::get(collection_id);
446 ensure!(sender == target_collection.unconfirmed_sponsor, "This address is not set as sponsor, use setCollectionSponsor first");890 ensure!(sender == target_collection.sponsor, Error::<T>::ConfirmUnsetSponsorFail);
447891
448 target_collection.sponsor = target_collection.unconfirmed_sponsor;892 target_collection.sponsor_confirmed = true;
449 target_collection.unconfirmed_sponsor = T::AccountId::default();
450 <Collection<T>>::insert(collection_id, target_collection);893 <Collection<T>>::insert(collection_id, target_collection);
451894
452 Ok(())895 Ok(())
453 }896 }
454897
455 #[weight = 0]898 /// Switch back to pay-per-own-transaction model.
899 ///
900 /// # Permissions
901 ///
902 /// * Collection owner.
903 ///
904 /// # Arguments
905 ///
906 /// * collection_id.
907 #[weight = <T as Config>::WeightInfo::remove_collection_sponsor()]
456 pub fn remove_collection_sponsor(origin, collection_id: u64) -> DispatchResult {908 pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {
457909
458 let sender = ensure_signed(origin)?;910 let sender = ensure_signed(origin)?;
459 ensure!(<Collection<T>>::contains_key(collection_id), "This collection does not exist");911 ensure!(<Collection<T>>::contains_key(collection_id), Error::<T>::CollectionNotFound);
460912
461 let mut target_collection = <Collection<T>>::get(collection_id);913 let mut target_collection = <Collection<T>>::get(collection_id);
462 ensure!(sender == target_collection.owner, "You do not own this collection");914 ensure!(sender == target_collection.owner, Error::<T>::NoPermission);
463915
464 target_collection.sponsor = T::AccountId::default();916 target_collection.sponsor = T::AccountId::default();
917 target_collection.sponsor_confirmed = false;
465 <Collection<T>>::insert(collection_id, target_collection);918 <Collection<T>>::insert(collection_id, target_collection);
466919
467 Ok(())920 Ok(())
468 }921 }
469922
470 #[weight = 0]923 /// This method creates a concrete instance of NFT Collection created with CreateCollection method.
924 ///
925 /// # Permissions
926 ///
471 pub fn create_item(origin, collection_id: u64, properties: Vec<u8>, owner: T::AccountId) -> DispatchResult {927 /// * Collection Owner.
928 /// * Collection Admin.
929 /// * Anyone if
930 /// * White List is enabled, and
931 /// * Address is added to white list, and
932 /// * MintPermission is enabled (see SetMintPermission method)
933 ///
934 /// # Arguments
935 ///
936 /// * collection_id: ID of the collection.
937 ///
938 /// * owner: Address, initial owner of the NFT.
939 ///
940 /// * data: Token data to store on chain.
941 // #[weight =
942 // (130_000_000 as Weight)
943 // .saturating_add((2135 as Weight).saturating_mul((properties.len() as u64) as Weight))
944 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))
945 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]
472946
947 #[weight = <T as Config>::WeightInfo::create_item(data.len())]
948 pub fn create_item(origin, collection_id: CollectionId, owner: T::AccountId, data: CreateItemData) -> DispatchResult {
949
473 let sender = ensure_signed(origin)?;950 let sender = ensure_signed(origin)?;
951
474 Self::collection_exists(collection_id)?;952 Self::collection_exists(collection_id)?;
953
475 let target_collection = <Collection<T>>::get(collection_id);954 let target_collection = <Collection<T>>::get(collection_id);
476955
477 if !Self::is_owner_or_admin_permissions(collection_id, sender.clone()) {956 Self::can_create_items_in_collection(collection_id, &target_collection, &sender, &owner)?;
478 if target_collection.mint_mode == false {
479 panic!("Collection is not in mint mode");957 Self::validate_create_item_args(&target_collection, &data)?;
480 }958 Self::create_item_no_validation(collection_id, owner, data)?;
481959
482 Self::check_white_list(collection_id, owner.clone())?;960 Ok(())
483 }961 }
484962
485 match target_collection.mode963 /// This method creates multiple instances of NFT Collection created with CreateCollection method.
486 {964 ///
965 /// # Permissions
487 CollectionMode::NFT(_) => {966 ///
967 /// * Collection Owner.
968 /// * Collection Admin.
969 /// * Anyone if
970 /// * White List is enabled, and
971 /// * Address is added to white list, and
972 /// * MintPermission is enabled (see SetMintPermission method)
973 ///
974 /// # Arguments
975 ///
976 /// * collection_id: ID of the collection.
977 ///
978 /// * itemsData: Array items properties. Each property is an array of bytes itself, see [create_item].
979 ///
980 /// * owner: Address, initial owner of the NFT.
981 #[weight = <T as Config>::WeightInfo::create_item(items_data.into_iter()
982 .map(|data| { data.len() })
983 .sum())]
984 pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::AccountId, items_data: Vec<CreateItemData>) -> DispatchResult {
488985
489 // check size986 ensure!(items_data.len() > 0, Error::<T>::EmptyArgument);
490 ensure!(target_collection.custom_data_size >= properties.len() as u32, "Size of item is too large");987 let sender = ensure_signed(origin)?;
491988
492 // Create nft item989 Self::collection_exists(collection_id)?;
493 let item = NftItemType {990 let target_collection = <Collection<T>>::get(collection_id);
494 collection: collection_id,
495 owner: owner,
496 data: properties.clone(),
497 };
498991
499 Self::add_nft_item(item)?;992 Self::can_create_items_in_collection(collection_id, &target_collection, &sender, &owner)?;
500993
501 },994 for data in &items_data {
995 Self::validate_create_item_args(&target_collection, data)?;
502 CollectionMode::Fungible(_) => {996 }
997 for data in &items_data {
998 Self::create_item_no_validation(collection_id, owner.clone(), data.clone())?;
999 }
5031000
504 // check size1001 Ok(())
505 ensure!(properties.len() as u32 == 0, "Size of item must be 0 with fungible type");1002 }
5061003
507 let item = FungibleItemType {1004 /// Destroys a concrete instance of NFT.
1005 ///
1006 /// # Permissions
508 collection: collection_id,1007 ///
1008 /// * Collection Owner.
1009 /// * Collection Admin.
509 owner: owner,1010 /// * Current NFT Owner.
1011 ///
1012 /// # Arguments
510 value: (10 as u128).pow(target_collection.decimal_points)1013 ///
1014 /// * collection_id: ID of the collection.
1015 ///
1016 /// * item_id: ID of NFT to burn.
1017 #[weight = <T as Config>::WeightInfo::burn_item()]
511 };1018 pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {
5121019
513 Self::add_fungible_item(item)?;1020 let sender = ensure_signed(origin)?;
514 },1021 Self::collection_exists(collection_id)?;
515 CollectionMode::ReFungible(_, _) => {
5161022
517 // check size1023 // Transfer permissions check
518 ensure!(target_collection.custom_data_size >= properties.len() as u32, "Size of item is too large");1024 let target_collection = <Collection<T>>::get(collection_id);
1025 ensure!(Self::is_item_owner(sender.clone(), collection_id, item_id) ||
1026 Self::is_owner_or_admin_permissions(collection_id, sender.clone()),
1027 Error::<T>::NoPermission);
5191028
520 let mut owner_list = Vec::new();1029 if target_collection.access == AccessMode::WhiteList {
521 let value = (10 as u128).pow(target_collection.decimal_points);1030 Self::check_white_list(collection_id, &sender)?;
522 owner_list.push(Ownership {owner: owner.clone(), fraction: value});1031 }
5231032
524 let item = ReFungibleItemType {1033 match target_collection.mode
1034 {
525 collection: collection_id,1035 CollectionMode::NFT => Self::burn_nft_item(collection_id, item_id)?,
526 owner: owner_list,
527 data: properties.clone()1036 CollectionMode::Fungible(_) => Self::burn_fungible_item(&sender, collection_id, value)?,
528 };
529
530 Self::add_refungible_item(item)?;1037 CollectionMode::ReFungible => Self::burn_refungible_item(collection_id, item_id, &sender)?,
531 },
532 _ => { ensure!(1 == 0,"just error"); }1038 _ => ()
533
534 };1039 };
5351040
536 // call event1041 // call event
537 Self::deposit_event(RawEvent::ItemCreated(collection_id, <ItemListIndex>::get(collection_id)));1042 Self::deposit_event(RawEvent::ItemDestroyed(collection_id, item_id));
5381043
539 Ok(())1044 Ok(())
540 }1045 }
5411046
542 #[weight = 0]1047 /// Change ownership of the token.
1048 ///
1049 /// # Permissions
1050 ///
1051 /// * Collection Owner
1052 /// * Collection Admin
1053 /// * Current NFT owner
1054 ///
1055 /// # Arguments
1056 ///
1057 /// * recipient: Address of token recipient.
1058 ///
1059 /// * collection_id.
1060 ///
1061 /// * item_id: ID of the item
1062 /// * Non-Fungible Mode: Required.
1063 /// * Fungible Mode: Ignored.
1064 /// * Re-Fungible Mode: Required.
1065 ///
1066 /// * value: Amount to transfer.
1067 /// * Non-Fungible Mode: Ignored
1068 /// * Fungible Mode: Must specify transferred amount
1069 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)
1070 #[weight = <T as Config>::WeightInfo::transfer()]
543 pub fn burn_item(origin, collection_id: u64, item_id: u64) -> DispatchResult {1071 pub fn transfer(origin, recipient: T::AccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {
1072 let sender = ensure_signed(origin)?;
1073 Self::transfer_internal(sender, recipient, collection_id, item_id, value)
1074 }
5441075
1076 /// Set, change, or remove approved address to transfer the ownership of the NFT.
1077 ///
1078 /// # Permissions
1079 ///
1080 /// * Collection Owner
1081 /// * Collection Admin
1082 /// * Current NFT owner
1083 ///
1084 /// # Arguments
1085 ///
1086 /// * approved: Address that is approved to transfer this NFT or zero (if needed to remove approval).
1087 ///
1088 /// * collection_id.
1089 ///
1090 /// * item_id: ID of the item.
1091 #[weight = <T as Config>::WeightInfo::approve()]
1092 pub fn approve(origin, spender: T::AccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResult {
1093
545 let sender = ensure_signed(origin)?;1094 let sender = ensure_signed(origin)?;
1095
546 Self::collection_exists(collection_id)?;1096 Self::collection_exists(collection_id)?;
547 let item_owner = Self::is_item_owner(sender.clone(), collection_id, item_id);1097 Self::token_exists(collection_id, item_id, &sender)?;
1098
548 if !item_owner1099 // Transfer permissions check
549 {1100 let target_collection = <Collection<T>>::get(collection_id);
550 if !Self::is_owner_or_admin_permissions(collection_id, sender.clone()) { 1101 ensure!(Self::is_item_owner(sender.clone(), collection_id, item_id) ||
1102 Self::is_owner_or_admin_permissions(collection_id, sender.clone()),
1103 Error::<T>::NoPermission);
1104
551 Self::check_white_list(collection_id, sender.clone())?;1105 if target_collection.access == AccessMode::WhiteList {
1106 Self::check_white_list(collection_id, &sender)?;
552 }1107 Self::check_white_list(collection_id, &spender)?;
553 }1108 }
1109
1110 let allowance_exists = <Allowances<T>>::contains_key(collection_id, (item_id, &sender, &spender));
1111 let mut allowance: u128 = amount;
1112 if allowance_exists {
1113 allowance += <Allowances<T>>::get(collection_id, (item_id, &sender, &spender));
1114 }
1115 <Allowances<T>>::insert(collection_id, (item_id, sender.clone(), spender.clone()), allowance);
1116
1117 Ok(())
1118 }
1119
1120 /// Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.
1121 ///
1122 /// # Permissions
1123 /// * Collection Owner
1124 /// * Collection Admin
1125 /// * Current NFT owner
1126 /// * Address approved by current NFT owner
1127 ///
1128 /// # Arguments
1129 ///
1130 /// * from: Address that owns token.
1131 ///
1132 /// * recipient: Address of token recipient.
1133 ///
1134 /// * collection_id.
1135 ///
1136 /// * item_id: ID of the item.
1137 ///
1138 /// * value: Amount to transfer.
1139 #[weight = <T as Config>::WeightInfo::transfer_from()]
1140 pub fn transfer_from(origin, from: T::AccountId, recipient: T::AccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResult {
1141
1142 let sender = ensure_signed(origin)?;
1143 let mut appoved_transfer = false;
1144
1145 // Check approval
1146 let mut approval: u128 = 0;
1147 if <Allowances<T>>::contains_key(collection_id, (item_id, &from, &sender)) {
1148 approval = <Allowances<T>>::get(collection_id, (item_id, &from, &sender));
1149 ensure!(approval >= value, Error::<T>::TokenValueNotEnough);
1150 appoved_transfer = true;
1151 }
1152
554 let target_collection = <Collection<T>>::get(collection_id);1153 let target_collection = <Collection<T>>::get(collection_id);
5551154
1155 // Limits check
1156 Self::is_correct_transfer(collection_id, &target_collection, &recipient)?;
1157
1158 // Transfer permissions check
1159 ensure!(appoved_transfer || Self::is_owner_or_admin_permissions(collection_id, sender.clone()),
1160 Error::<T>::NoPermission);
1161
1162 if target_collection.access == AccessMode::WhiteList {
1163 Self::check_white_list(collection_id, &sender)?;
1164 Self::check_white_list(collection_id, &recipient)?;
1165 }
1166
1167 // Reduce approval by transferred amount or remove if remaining approval drops to 0
1168 if approval.checked_sub(value).unwrap_or(0) > 0 {
1169 <Allowances<T>>::insert(collection_id, (item_id, &from, &sender), approval - value);
1170 }
1171 else {
1172 <Allowances<T>>::remove(collection_id, (item_id, &from, &sender));
1173 }
1174
556 match target_collection.mode1175 match target_collection.mode
557 {1176 {
558 CollectionMode::NFT(_) => Self::burn_nft_item(collection_id, item_id)?,1177 CollectionMode::NFT => Self::transfer_nft(collection_id, item_id, from, recipient)?,
559 CollectionMode::Fungible(_) => Self::burn_fungible_item(collection_id, item_id)?,1178 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, value, &from, &recipient)?,
560 CollectionMode::ReFungible(_, _) => Self::burn_refungible_item(collection_id, item_id, sender.clone())?,1179 CollectionMode::ReFungible => Self::transfer_refungible(collection_id, item_id, value, from.clone(), recipient)?,
561 _ => ()1180 _ => ()
562 };1181 };
5631182
564 // call event
565 Self::deposit_event(RawEvent::ItemDestroyed(collection_id, item_id));
566
567 Ok(())1183 Ok(())
568 }1184 }
5691185
570 #[weight = 0]1186 // #[weight = 0]
571 pub fn transfer(origin, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64) -> DispatchResult {1187 // pub fn safe_transfer_from(origin, collection_id: CollectionId, item_id: TokenId, new_owner: T::AccountId) -> DispatchResult {
5721188
1189 // // let no_perm_mes = "You do not have permissions to modify this collection";
1190 // // ensure!(<ApprovedList<T>>::contains_key((collection_id, item_id)), no_perm_mes);
1191 // // let list_itm = <ApprovedList<T>>::get((collection_id, item_id));
1192 // // ensure!(list_itm.contains(&new_owner.clone()), no_perm_mes);
1193
1194 // // // on_nft_received call
1195
1196 // // Self::transfer(origin, collection_id, item_id, new_owner)?;
1197
1198 // Ok(())
1199 // }
1200
1201 /// Set off-chain data schema.
1202 ///
1203 /// # Permissions
1204 ///
1205 /// * Collection Owner
1206 /// * Collection Admin
1207 ///
1208 /// # Arguments
1209 ///
1210 /// * collection_id.
1211 ///
1212 /// * schema: String representing the offchain data schema.
1213 #[weight = <T as Config>::WeightInfo::set_variable_meta_data()]
1214 pub fn set_variable_meta_data (
1215 origin,
1216 collection_id: CollectionId,
1217 item_id: TokenId,
1218 data: Vec<u8>
1219 ) -> DispatchResult {
573 let sender = ensure_signed(origin)?;1220 let sender = ensure_signed(origin)?;
1221
1222 Self::collection_exists(collection_id)?;
1223 Self::token_exists(collection_id, item_id, &sender)?;
5741224
575 let item_owner = Self::is_item_owner(sender.clone(), collection_id, item_id);1225 ensure!(ChainLimit::get().custom_data_limit >= data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);
576 if !item_owner {
577 Self::check_white_list(collection_id, sender.clone())?;
578 Self::check_white_list(collection_id, recipient.clone())?;
579 }
5801226
1227 // Modify permissions check
581 let target_collection = <Collection<T>>::get(collection_id);1228 let target_collection = <Collection<T>>::get(collection_id);
1229 ensure!(Self::is_item_owner(sender.clone(), collection_id, item_id) ||
1230 Self::is_owner_or_admin_permissions(collection_id, sender.clone()),
1231 Error::<T>::NoPermission);
5821232
583 match target_collection.mode1233 match target_collection.mode
584 {1234 {
585 CollectionMode::NFT(_) => Self::transfer_nft(collection_id, item_id, sender.clone(), recipient)?,1235 CollectionMode::NFT => Self::set_nft_variable_data(collection_id, item_id, data)?,
586 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, item_id, value, sender.clone(), recipient)?,1236 CollectionMode::ReFungible => Self::set_re_fungible_variable_data(collection_id, item_id, data)?,
587 CollectionMode::ReFungible(_, _) => Self::transfer_refungible(collection_id, item_id, value, sender.clone(), recipient)?,1237 CollectionMode::Fungible(_) => fail!(Error::<T>::CantStoreMetadataInFungibleTokens),
588 _ => ()1238 _ => fail!(Error::<T>::UnexpectedCollectionType)
589 };1239 };
5901240
591 Ok(())1241 Ok(())
592 }1242 }
1243
1244 /// Set schema standard
1245 /// ImageURL
1246 /// Unique
1247 ///
1248 /// # Permissions
1249 ///
1250 /// * Collection Owner
1251 /// * Collection Admin
1252 ///
1253 /// # Arguments
1254 ///
1255 /// * collection_id.
1256 ///
1257 /// * schema: SchemaVersion: enum
1258 #[weight = <T as Config>::WeightInfo::set_schema_version()]
1259 pub fn set_schema_version(
1260 origin,
1261 collection_id: CollectionId,
1262 version: SchemaVersion
1263 ) -> DispatchResult {
1264 let sender = ensure_signed(origin)?;
1265 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;
1266 let mut target_collection = <Collection<T>>::get(collection_id);
1267 target_collection.schema_version = version;
1268 <Collection<T>>::insert(collection_id, target_collection);
5931269
594 #[weight = 0]1270 Ok(())
595 pub fn approve(origin, approved: T::AccountId, collection_id: u64, item_id: u64) -> DispatchResult {1271 }
5961272
1273 /// Set off-chain data schema.
1274 ///
1275 /// # Permissions
1276 ///
1277 /// * Collection Owner
1278 /// * Collection Admin
1279 ///
1280 /// # Arguments
1281 ///
1282 /// * collection_id.
1283 ///
1284 /// * schema: String representing the offchain data schema.
1285 #[weight = <T as Config>::WeightInfo::set_offchain_schema()]
1286 pub fn set_offchain_schema(
1287 origin,
1288 collection_id: CollectionId,
1289 schema: Vec<u8>
1290 ) -> DispatchResult {
597 let sender = ensure_signed(origin)?;1291 let sender = ensure_signed(origin)?;
1292 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;
5981293
599 // amount param stub1294 // check schema limit
600 let amount = 100000000;1295 ensure!(schema.len() as u32 <= ChainLimit::get().offchain_schema_limit, "");
6011296
602 let item_owner = Self::is_item_owner(sender.clone(), collection_id, item_id);1297 let mut target_collection = <Collection<T>>::get(collection_id);
603 if !item_owner {1298 target_collection.offchain_schema = schema;
604 Self::check_white_list(collection_id, approved.clone())?;1299 <Collection<T>>::insert(collection_id, target_collection);
605 }
6061300
607 let list_exists = <ApprovedList<T>>::contains_key(collection_id, (item_id, sender.clone()));1301 Ok(())
608 if list_exists {1302 }
6091303
610 let mut list = <ApprovedList<T>>::get(collection_id, (item_id, sender.clone()));1304 /// Set const on-chain data schema.
1305 ///
1306 /// # Permissions
1307 ///
1308 /// * Collection Owner
1309 /// * Collection Admin
1310 ///
1311 /// # Arguments
1312 ///
1313 /// * collection_id.
1314 ///
1315 /// * schema: String representing the const on-chain data schema.
1316 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]
1317 pub fn set_const_on_chain_schema (
1318 origin,
1319 collection_id: CollectionId,
611 let item_contains = list.iter().any(|i| i.approved == approved);1320 schema: Vec<u8>
1321 ) -> DispatchResult {
1322 let sender = ensure_signed(origin)?;
1323 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;
6121324
613 if !item_contains {1325 // check schema limit
614 list.push(ApprovePermissions { approved: approved.clone(), amount: amount });1326 ensure!(schema.len() as u32 <= ChainLimit::get().const_on_chain_schema_limit, "");
615 <ApprovedList<T>>::insert(collection_id, (item_id, sender.clone()), list);
616 }
617 } else {
6181327
619 let mut list = Vec::new();1328 let mut target_collection = <Collection<T>>::get(collection_id);
620 list.push(ApprovePermissions { approved: approved.clone(), amount: amount });1329 target_collection.const_on_chain_schema = schema;
621 <ApprovedList<T>>::insert(collection_id, (item_id, sender.clone()), list);1330 <Collection<T>>::insert(collection_id, target_collection);
622 }
6231331
624 Ok(())1332 Ok(())
625 }1333 }
6261334
627 #[weight = 0]1335 /// Set variable on-chain data schema.
1336 ///
1337 /// # Permissions
1338 ///
1339 /// * Collection Owner
1340 /// * Collection Admin
1341 ///
1342 /// # Arguments
1343 ///
1344 /// * collection_id.
1345 ///
1346 /// * schema: String representing the variable on-chain data schema.
1347 #[weight = <T as Config>::WeightInfo::set_const_on_chain_schema()]
628 pub fn transfer_from(origin, from: T::AccountId, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64 ) -> DispatchResult {1348 pub fn set_variable_on_chain_schema (
1349 origin,
1350 collection_id: CollectionId,
1351 schema: Vec<u8>
1352 ) -> DispatchResult {
1353 let sender = ensure_signed(origin)?;
1354 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;
6291355
1356 // check schema limit
1357 ensure!(schema.len() as u32 <= ChainLimit::get().variable_on_chain_schema_limit, "");
1358
1359 let mut target_collection = <Collection<T>>::get(collection_id);
1360 target_collection.variable_on_chain_schema = schema;
1361 <Collection<T>>::insert(collection_id, target_collection);
1362
1363 Ok(())
1364 }
1365
1366 // Sudo permissions function
1367 #[weight = <T as Config>::WeightInfo::set_chain_limits()]
1368 pub fn set_chain_limits(
1369 origin,
1370 limits: ChainLimits
1371 ) -> DispatchResult {
1372
1373 #[cfg(not(feature = "runtime-benchmarks"))]
1374 ensure_root(origin)?;
1375
1376 <ChainLimit>::put(limits);
1377 Ok(())
1378 }
1379
1380 /// Enable smart contract self-sponsoring.
1381 ///
1382 /// # Permissions
1383 ///
1384 /// * Contract Owner
1385 ///
1386 /// # Arguments
1387 ///
1388 /// * contract address
1389 /// * enable flag
1390 ///
1391 #[weight = <T as Config>::WeightInfo::enable_contract_sponsoring()]
1392 pub fn enable_contract_sponsoring(
1393 origin,
1394 contract_address: T::AccountId,
1395 enable: bool
1396 ) -> DispatchResult {
1397
630 let sender = ensure_signed(origin)?;1398 let sender = ensure_signed(origin)?;
631 let approved_list_exists = <ApprovedList<T>>::contains_key(collection_id, (item_id, from.clone()));
632 if approved_list_exists
633 {
634 Self::check_white_list(collection_id, from.clone())?;
635 Self::check_white_list(collection_id, recipient.clone())?;
6361399
637 let list_itm = <ApprovedList<T>>::get(collection_id, (item_id, from.clone()));1400 #[cfg(feature = "runtime-benchmarks")]
638 let opt_item = list_itm.iter().find(|i| i.approved == sender.clone());1401 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());
639 ensure!(opt_item.is_some(), "No approve found");
640 ensure!(opt_item.unwrap().amount >= value, "Requested value more than approved");
6411402
642 // remove approve1403 Self::ensure_contract_owned(sender, &contract_address)?;
643 let approve_list: Vec<ApprovePermissions<T::AccountId>> = <ApprovedList<T>>::get(collection_id, (item_id, from.clone()))
644 .into_iter().filter(|i| i.approved != sender.clone()).collect();
645 <ApprovedList<T>>::insert(collection_id, (item_id, from.clone()), approve_list);
646 }
647 else
648 {
649 panic!("Only approved addresses can call this method");
650 }
6511404
652 let target_collection = <Collection<T>>::get(collection_id);1405 <ContractSelfSponsoring<T>>::insert(contract_address, enable);
1406 Ok(())
1407 }
6531408
654 match target_collection.mode1409 /// Set the rate limit for contract sponsoring to specified number of blocks.
655 {1410 ///
656 CollectionMode::NFT(_) => Self::transfer_nft(collection_id, item_id, from, recipient)?,1411 /// If not set (has the default value of 0 blocks), the sponsoring will be disabled.
657 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, item_id, value, from.clone(), recipient)?,1412 /// If set to the number B (for blocks), the transactions will be sponsored with a rate
1413 /// limit of B, i.e. fees for every transaction sent to this smart contract will be paid
1414 /// from contract endowment if there are at least B blocks between such transactions.
1415 /// Nonetheless, if transactions are sent more frequently, the fees are paid by the sender.
658 CollectionMode::ReFungible(_, _) => Self::transfer_refungible(collection_id, item_id, value, from.clone(), recipient)?,1416 ///
1417 /// # Permissions
1418 ///
1419 /// * Contract Owner
1420 ///
1421 /// # Arguments
1422 ///
1423 /// -`contract_address`: Address of the contract to sponsor
1424 /// -`rate_limit`: Number of blocks to wait until the next sponsored transaction is allowed
1425 ///
1426 #[weight = <T as Config>::WeightInfo::set_contract_sponsoring_rate_limit()]
1427 pub fn set_contract_sponsoring_rate_limit(
1428 origin,
1429 contract_address: T::AccountId,
659 _ => ()1430 rate_limit: T::BlockNumber
1431 ) -> DispatchResult {
660 };1432 let sender = ensure_signed(origin)?;
6611433
1434 #[cfg(feature = "runtime-benchmarks")]
1435 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());
1436
1437 Self::ensure_contract_owned(sender, &contract_address)?;
1438 <ContractSponsoringRateLimit<T>>::insert(contract_address, rate_limit);
662 Ok(())1439 Ok(())
663 }1440 }
6641441
665 #[weight = 0]1442 /// Enable the white list for a contract. Only addresses added to the white list with addToContractWhiteList will be able to call this smart contract.
1443 ///
1444 /// # Permissions
1445 ///
1446 /// * Address that deployed smart contract.
1447 ///
1448 /// # Arguments
1449 ///
1450 /// -`contract_address`: Address of the contract.
1451 ///
1452 /// - `enable`: .
1453 #[weight = <T as Config>::WeightInfo::toggle_contract_white_list()]
666 pub fn safe_transfer_from(origin, collection_id: u64, item_id: u64, new_owner: T::AccountId) -> DispatchResult {1454 pub fn toggle_contract_white_list(
1455 origin,
1456 contract_address: T::AccountId,
1457 enable: bool
1458 ) -> DispatchResult {
1459 let sender = ensure_signed(origin)?;
6671460
668 // let no_perm_mes = "You do not have permissions to modify this collection";1461 #[cfg(feature = "runtime-benchmarks")]
669 // ensure!(<ApprovedList<T>>::contains_key((collection_id, item_id)), no_perm_mes);1462 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());
670 // let list_itm = <ApprovedList<T>>::get((collection_id, item_id));
671 // ensure!(list_itm.contains(&new_owner.clone()), no_perm_mes);
6721463
673 // // on_nft_received call1464 Self::ensure_contract_owned(sender, &contract_address)?;
1465 <ContractWhiteListEnabled<T>>::insert(contract_address, enable);
1466 Ok(())
1467 }
1468
1469 /// Add an address to smart contract white list.
1470 ///
1471 /// # Permissions
1472 ///
1473 /// * Address that deployed smart contract.
1474 ///
1475 /// # Arguments
1476 ///
1477 /// -`contract_address`: Address of the contract.
1478 ///
1479 /// -`account_address`: Address to add.
1480 #[weight = <T as Config>::WeightInfo::add_to_contract_white_list()]
1481 pub fn add_to_contract_white_list(
1482 origin,
1483 contract_address: T::AccountId,
1484 account_address: T::AccountId
1485 ) -> DispatchResult {
1486 let sender = ensure_signed(origin)?;
6741487
675 // Self::transfer(origin, collection_id, item_id, new_owner)?;1488 #[cfg(feature = "runtime-benchmarks")]
1489 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());
1490
1491 Self::ensure_contract_owned(sender, &contract_address)?;
1492 <ContractWhiteList<T>>::insert(contract_address, account_address, true);
1493 Ok(())
1494 }
6761495
1496 /// Remove an address from smart contract white list.
1497 ///
1498 /// # Permissions
1499 ///
1500 /// * Address that deployed smart contract.
1501 ///
1502 /// # Arguments
1503 ///
1504 /// -`contract_address`: Address of the contract.
1505 ///
1506 /// -`account_address`: Address to remove.
1507 #[weight = <T as Config>::WeightInfo::remove_from_contract_white_list()]
1508 pub fn remove_from_contract_white_list(
1509 origin,
1510 contract_address: T::AccountId,
1511 account_address: T::AccountId
1512 ) -> DispatchResult {
1513 let sender = ensure_signed(origin)?;
1514
1515 #[cfg(feature = "runtime-benchmarks")]
1516 <ContractOwner<T>>::insert(contract_address.clone(), sender.clone());
1517
1518 Self::ensure_contract_owned(sender, &contract_address)?;
1519 <ContractWhiteList<T>>::remove(contract_address, account_address);
677 Ok(())1520 Ok(())
678 }1521 }
6791522
680 #[weight = 0]1523 #[weight = <T as Config>::WeightInfo::set_collection_limits()]
681 pub fn set_offchain_schema(1524 pub fn set_collection_limits(
682 origin,1525 origin,
683 collection_id: u64,1526 collection_id: u32,
684 schema: Vec<u8>1527 limits: CollectionLimits,
685 ) -> DispatchResult {1528 ) -> DispatchResult {
686 let sender = ensure_signed(origin)?;1529 let sender = ensure_signed(origin)?;
687 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;1530 Self::check_owner_permissions(collection_id, sender.clone())?;
1531 let mut target_collection = <Collection<T>>::get(collection_id);
1532 let chain_limits = ChainLimit::get();
1533 let climits = target_collection.limits;
6881534
689 let mut target_collection = <Collection<T>>::get(collection_id);1535 // collection bounds
1536 ensure!(limits.sponsor_transfer_timeout <= MAX_SPONSOR_TIMEOUT &&
1537 limits.account_token_ownership_limit <= MAX_TOKEN_OWNERSHIP,
1538 Error::<T>::CollectionLimitBoundsExceeded);
1539
1540 // token_limit check prev
1541 ensure!(climits.token_limit > limits.token_limit &&
1542 limits.token_limit <= chain_limits.account_token_ownership_limit,
1543 Error::<T>::AccountTokenLimitExceeded);
1544
690 target_collection.offchain_schema = schema;1545 target_collection.limits = limits;
691 <Collection<T>>::insert(collection_id, target_collection);1546 <Collection<T>>::insert(collection_id, target_collection);
6921547
693 Ok(())1548 Ok(())
694 }1549 }
695 }1550 }
696}1551}
6971552
698impl<T: Trait> Module<T> {1553impl<T: Config> Module<T> {
699 fn add_fungible_item(item: FungibleItemType<T::AccountId>) -> DispatchResult {
700 let current_index = <ItemListIndex>::get(item.collection)
701 .checked_add(1)
702 .expect("Item list index id error");
703 let itemcopy = item.clone();
704 let owner = item.owner.clone();
705 let value = item.value as u64;
7061554
707 Self::add_token_index(item.collection, current_index, owner.clone())?;1555 pub fn transfer_internal(sender: T::AccountId, recipient: T::AccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResult {
7081556
709 <ItemListIndex>::insert(item.collection, current_index);1557 let target_collection = <Collection<T>>::get(collection_id);
710 <FungibleItemList<T>>::insert(item.collection, current_index, itemcopy);
7111558
1559 // Limits check
1560 Self::is_correct_transfer(collection_id, &target_collection, &recipient)?;
1561
1562 // Transfer permissions check
1563 ensure!(Self::is_item_owner(sender.clone(), collection_id, item_id) ||
1564 Self::is_owner_or_admin_permissions(collection_id, sender.clone()),
1565 Error::<T>::NoPermission);
1566
1567 if target_collection.access == AccessMode::WhiteList {
1568 Self::check_white_list(collection_id, &sender)?;
1569 Self::check_white_list(collection_id, &recipient)?;
1570 }
1571
1572 match target_collection.mode
1573 {
1574 CollectionMode::NFT => Self::transfer_nft(collection_id, item_id, sender.clone(), recipient.clone())?,
1575 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, value, &sender, &recipient)?,
1576 CollectionMode::ReFungible => Self::transfer_refungible(collection_id, item_id, value, sender.clone(), recipient.clone())?,
1577 _ => ()
1578 };
1579
1580 Self::deposit_event(RawEvent::Transfer(collection_id, item_id, sender, recipient, value));
1581
1582 Ok(())
1583 }
1584
1585
1586 fn is_correct_transfer(collection_id: CollectionId, collection: &CollectionType<T::AccountId>, recipient: &T::AccountId) -> DispatchResult {
1587
1588 // check token limit and account token limit
1589 let account_items: u32 = <AddressTokens<T>>::get(collection_id, recipient).len() as u32;
1590 ensure!(collection.limits.account_token_ownership_limit > account_items, Error::<T>::AccountTokenLimitExceeded);
1591
1592 Ok(())
1593 }
1594
1595 fn can_create_items_in_collection(collection_id: CollectionId, collection: &CollectionType<T::AccountId>, sender: &T::AccountId, owner: &T::AccountId) -> DispatchResult {
1596
1597 // check token limit and account token limit
1598 let total_items: u32 = ItemListIndex::get(collection_id);
1599 let account_items: u32 = <AddressTokens<T>>::get(collection_id, owner).len() as u32;
1600 ensure!(collection.limits.token_limit > total_items, Error::<T>::CollectionTokenLimitExceeded);
1601 ensure!(collection.limits.account_token_ownership_limit > account_items, Error::<T>::AccountTokenLimitExceeded);
1602
1603 if !Self::is_owner_or_admin_permissions(collection_id, sender.clone()) {
1604 ensure!(collection.mint_mode == true, Error::<T>::PublicMintingNotAllowed);
1605 Self::check_white_list(collection_id, owner)?;
1606 Self::check_white_list(collection_id, sender)?;
1607 }
1608
1609 Ok(())
1610 }
1611
1612 fn validate_create_item_args(target_collection: &CollectionType<T::AccountId>, data: &CreateItemData) -> DispatchResult {
1613 match target_collection.mode
1614 {
1615 CollectionMode::NFT => {
1616 if let CreateItemData::NFT(data) = data {
1617 // check sizes
1618 ensure!(ChainLimit::get().custom_data_limit >= data.const_data.len() as u32, Error::<T>::TokenConstDataLimitExceeded);
1619 ensure!(ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);
1620 } else {
1621 fail!(Error::<T>::NotNftDataUsedToMintNftCollectionToken);
1622 }
1623 },
1624 CollectionMode::Fungible(_) => {
1625 if let CreateItemData::Fungible(_) = data {
1626 } else {
1627 fail!(Error::<T>::NotFungibleDataUsedToMintFungibleCollectionToken);
1628 }
1629 },
1630 CollectionMode::ReFungible => {
1631 if let CreateItemData::ReFungible(data) = data {
1632
1633 // check sizes
1634 ensure!(ChainLimit::get().custom_data_limit >= data.const_data.len() as u32, Error::<T>::TokenConstDataLimitExceeded);
1635 ensure!(ChainLimit::get().custom_data_limit >= data.variable_data.len() as u32, Error::<T>::TokenVariableDataLimitExceeded);
1636
1637 // Check refungibility limits
1638 ensure!(data.pieces <= MAX_REFUNGIBLE_PIECES, Error::<T>::WrongRefungiblePieces);
1639 ensure!(data.pieces > 0, Error::<T>::WrongRefungiblePieces);
1640 } else {
1641 fail!(Error::<T>::NotReFungibleDataUsedToMintReFungibleCollectionToken);
1642 }
1643 },
1644 _ => { fail!(Error::<T>::UnexpectedCollectionType); }
1645 };
1646
1647 Ok(())
1648 }
1649
1650 fn create_item_no_validation(collection_id: CollectionId, owner: T::AccountId, data: CreateItemData) -> DispatchResult {
1651 match data
1652 {
1653 CreateItemData::NFT(data) => {
1654 let item = NftItemType {
1655 owner: owner.clone(),
1656 const_data: data.const_data,
1657 variable_data: data.variable_data
1658 };
1659
1660 Self::add_nft_item(collection_id, item)?;
1661 },
1662 CreateItemData::Fungible(data) => {
1663 Self::add_fungible_item(collection_id, &owner, data.value)?;
1664 },
1665 CreateItemData::ReFungible(data) => {
1666 let mut owner_list = Vec::new();
1667 owner_list.push(Ownership {owner: owner.clone(), fraction: data.pieces});
1668
1669 let item = ReFungibleItemType {
1670 owner: owner_list,
1671 const_data: data.const_data,
1672 variable_data: data.variable_data
1673 };
1674
1675 Self::add_refungible_item(collection_id, item)?;
1676 }
1677 };
1678
1679 // call event
1680 Self::deposit_event(RawEvent::ItemCreated(collection_id, <ItemListIndex>::get(collection_id), owner));
1681
1682 Ok(())
1683 }
1684
1685 fn add_fungible_item(collection_id: CollectionId, owner: &T::AccountId, value: u128) -> DispatchResult {
1686
1687 // Does new owner already have an account?
1688 let mut balance: u128 = 0;
1689 if <FungibleItemList<T>>::contains_key(collection_id, owner) {
1690 balance = <FungibleItemList<T>>::get(collection_id, owner).value;
1691 }
1692
1693 // Mint
1694 let item = FungibleItemType {
1695 value: balance + value
1696 };
1697 <FungibleItemList<T>>::insert(collection_id, (*owner).clone(), item);
1698
712 // Update balance1699 // Update balance
713 let new_balance = <Balance<T>>::get(item.collection, owner.clone())1700 let new_balance = <Balance<T>>::get(collection_id, owner)
714 .checked_add(value)1701 .checked_add(value)
715 .unwrap();1702 .ok_or(Error::<T>::NumOverflow)?;
716 <Balance<T>>::insert(item.collection, owner.clone(), new_balance);1703 <Balance<T>>::insert(collection_id, (*owner).clone(), new_balance);
7171704
718 Ok(())1705 Ok(())
719 }1706 }
7201707
721 fn add_refungible_item(item: ReFungibleItemType<T::AccountId>) -> DispatchResult {1708 fn add_refungible_item(collection_id: CollectionId, item: ReFungibleItemType<T::AccountId>) -> DispatchResult {
722 let current_index = <ItemListIndex>::get(item.collection)1709 let current_index = <ItemListIndex>::get(collection_id)
723 .checked_add(1)1710 .checked_add(1)
724 .expect("Item list index id error");1711 .ok_or(Error::<T>::NumOverflow)?;
725 let itemcopy = item.clone();1712 let itemcopy = item.clone();
7261713
727 let value = item.owner.first().unwrap().fraction as u64;1714 let value = item.owner.first().unwrap().fraction;
728 let owner = item.owner.first().unwrap().owner.clone();1715 let owner = item.owner.first().unwrap().owner.clone();
7291716
730 Self::add_token_index(item.collection, current_index, owner.clone())?;1717 Self::add_token_index(collection_id, current_index, &owner)?;
7311718
732 <ItemListIndex>::insert(item.collection, current_index);1719 <ItemListIndex>::insert(collection_id, current_index);
733 <ReFungibleItemList<T>>::insert(item.collection, current_index, itemcopy);1720 <ReFungibleItemList<T>>::insert(collection_id, current_index, itemcopy);
7341721
735 // Update balance1722 // Update balance
736 let new_balance = <Balance<T>>::get(item.collection, owner.clone())1723 let new_balance = <Balance<T>>::get(collection_id, &owner)
737 .checked_add(value)1724 .checked_add(value)
738 .unwrap();1725 .ok_or(Error::<T>::NumOverflow)?;
739 <Balance<T>>::insert(item.collection, owner.clone(), new_balance);1726 <Balance<T>>::insert(collection_id, owner.clone(), new_balance);
7401727
741 Ok(())1728 Ok(())
742 }1729 }
7431730
744 fn add_nft_item(item: NftItemType<T::AccountId>) -> DispatchResult {1731 fn add_nft_item(collection_id: CollectionId, item: NftItemType<T::AccountId>) -> DispatchResult {
745 let current_index = <ItemListIndex>::get(item.collection)1732 let current_index = <ItemListIndex>::get(collection_id)
746 .checked_add(1)1733 .checked_add(1)
747 .expect("Item list index id error");1734 .ok_or(Error::<T>::NumOverflow)?;
7481735
749 let item_owner = item.owner.clone();1736 let item_owner = item.owner.clone();
750 let collection_id = item.collection.clone();1737 Self::add_token_index(collection_id, current_index, &item.owner)?;
751 Self::add_token_index(collection_id, current_index, item.owner.clone())?;
7521738
753 <ItemListIndex>::insert(collection_id, current_index);1739 <ItemListIndex>::insert(collection_id, current_index);
754 <NftItemList<T>>::insert(collection_id, current_index, item);1740 <NftItemList<T>>::insert(collection_id, current_index, item);
7551741
756 // Update balance1742 // Update balance
757 let new_balance = <Balance<T>>::get(collection_id, item_owner.clone())1743 let new_balance = <Balance<T>>::get(collection_id, item_owner.clone())
758 .checked_add(1)1744 .checked_add(1)
759 .unwrap();1745 .ok_or(Error::<T>::NumOverflow)?;
760 <Balance<T>>::insert(collection_id, item_owner.clone(), new_balance);1746 <Balance<T>>::insert(collection_id, item_owner.clone(), new_balance);
7611747
762 Ok(())1748 Ok(())
763 }1749 }
7641750
765 fn burn_refungible_item(collection_id: u64, item_id: u64, owner: T::AccountId) -> DispatchResult {1751 fn burn_refungible_item(
1752 collection_id: CollectionId,
1753 item_id: TokenId,
1754 owner: &T::AccountId,
1755 ) -> DispatchResult {
766 ensure!(1756 ensure!(
767 <ReFungibleItemList<T>>::contains_key(collection_id, item_id),1757 <ReFungibleItemList<T>>::contains_key(collection_id, item_id),
768 "Item does not exists"1758 Error::<T>::TokenNotFound
769 );1759 );
770 let collection = <ReFungibleItemList<T>>::get(collection_id, item_id);1760 let mut token = <ReFungibleItemList<T>>::get(collection_id, item_id);
771 let item = collection1761 let rft_balance = token
772 .owner1762 .owner
773 .iter()1763 .iter()
774 .filter(|&i| i.owner == owner)1764 .filter(|&i| i.owner == *owner)
775 .next()1765 .next()
776 .unwrap();1766 .unwrap();
777 Self::remove_token_index(collection_id, item_id, owner.clone())?;1767 Self::remove_token_index(collection_id, item_id, owner)?;
7781768
779 // remove approve list1769 // update balance
780 <ApprovedList<T>>::remove(collection_id, (item_id, owner.clone()));1770 let new_balance = <Balance<T>>::get(collection_id, rft_balance.owner.clone())
1771 .checked_sub(rft_balance.fraction)
1772 .ok_or(Error::<T>::NumOverflow)?;
1773 <Balance<T>>::insert(collection_id, rft_balance.owner.clone(), new_balance);
7811774
782 // update balance1775 // Re-create owners list with sender removed
783 let new_balance = <Balance<T>>::get(collection_id, item.owner.clone())1776 let index = token
1777 .owner
1778 .iter()
784 .checked_sub(item.fraction as u64)1779 .position(|i| i.owner == *owner)
785 .unwrap();1780 .unwrap();
786 <Balance<T>>::insert(collection_id, item.owner.clone(), new_balance);1781 token.owner.remove(index);
1782 let owner_count = token.owner.len();
7871783
788 <ReFungibleItemList<T>>::remove(collection_id, item_id);1784 // Burn the token completely if this was the last (only) owner
1785 if owner_count == 0 {
1786 <ReFungibleItemList<T>>::remove(collection_id, item_id);
1787 }
1788 else {
1789 <ReFungibleItemList<T>>::insert(collection_id, item_id, token);
1790 }
7891791
790 Ok(())1792 Ok(())
791 }1793 }
7921794
793 fn burn_nft_item(collection_id: u64, item_id: u64) -> DispatchResult {1795 fn burn_nft_item(collection_id: CollectionId, item_id: TokenId) -> DispatchResult {
794 ensure!(1796 ensure!(
795 <NftItemList<T>>::contains_key(collection_id, item_id),1797 <NftItemList<T>>::contains_key(collection_id, item_id),
796 "Item does not exists"1798 Error::<T>::TokenNotFound
797 );1799 );
798 let item = <NftItemList<T>>::get(collection_id, item_id);1800 let item = <NftItemList<T>>::get(collection_id, item_id);
799 Self::remove_token_index(collection_id, item_id, item.owner.clone())?;1801 Self::remove_token_index(collection_id, item_id, &item.owner)?;
8001802
801 // remove approve list
802 <ApprovedList<T>>::remove(collection_id, (item_id, item.owner.clone()));
803
804 // update balance1803 // update balance
805 let new_balance = <Balance<T>>::get(collection_id, item.owner.clone())1804 let new_balance = <Balance<T>>::get(collection_id, &item.owner)
806 .checked_sub(1)1805 .checked_sub(1)
807 .unwrap();1806 .ok_or(Error::<T>::NumOverflow)?;
808 <Balance<T>>::insert(collection_id, item.owner.clone(), new_balance);1807 <Balance<T>>::insert(collection_id, item.owner.clone(), new_balance);
809 <NftItemList<T>>::remove(collection_id, item_id);1808 <NftItemList<T>>::remove(collection_id, item_id);
8101809
811 Ok(())1810 Ok(())
812 }1811 }
8131812
814 fn burn_fungible_item(collection_id: u64, item_id: u64) -> DispatchResult {1813 fn burn_fungible_item(owner: &T::AccountId, collection_id: CollectionId, value: u128) -> DispatchResult {
815 ensure!(1814 ensure!(
816 <FungibleItemList<T>>::contains_key(collection_id, item_id),1815 <FungibleItemList<T>>::contains_key(collection_id, owner),
817 "Item does not exists"1816 Error::<T>::TokenNotFound
818 );1817 );
819 let item = <FungibleItemList<T>>::get(collection_id, item_id);1818 let mut balance = <FungibleItemList<T>>::get(collection_id, owner);
820 Self::remove_token_index(collection_id, item_id, item.owner.clone())?;1819 ensure!(balance.value >= value, Error::<T>::TokenValueNotEnough);
8211820
822 // remove approve list
823 <ApprovedList<T>>::remove(collection_id, (item_id, item.owner.clone()));
824
825 // update balance1821 // update balance
826 let new_balance = <Balance<T>>::get(collection_id, item.owner.clone())1822 let new_balance = <Balance<T>>::get(collection_id, owner)
827 .checked_sub(item.value as u64)1823 .checked_sub(value)
828 .unwrap();1824 .ok_or(Error::<T>::NumOverflow)?;
829 <Balance<T>>::insert(collection_id, item.owner.clone(), new_balance);1825 <Balance<T>>::insert(collection_id, (*owner).clone(), new_balance);
8301826
831 <FungibleItemList<T>>::remove(collection_id, item_id);1827 if balance.value - value > 0 {
1828 balance.value -= value;
1829 <FungibleItemList<T>>::insert(collection_id, (*owner).clone(), balance);
1830 }
1831 else {
1832 <FungibleItemList<T>>::remove(collection_id, owner);
1833 }
8321834
833 Ok(())1835 Ok(())
834 }1836 }
8351837
836 fn collection_exists(collection_id: u64) -> DispatchResult {1838 fn collection_exists(collection_id: CollectionId) -> DispatchResult {
837 ensure!(1839 ensure!(
838 <Collection<T>>::contains_key(collection_id),1840 <Collection<T>>::contains_key(collection_id),
839 "This collection does not exist"1841 Error::<T>::CollectionNotFound
840 );1842 );
841 Ok(())1843 Ok(())
842 }1844 }
8431845
844 fn check_owner_permissions(collection_id: u64, subject: T::AccountId) -> DispatchResult {1846 fn check_owner_permissions(collection_id: CollectionId, subject: T::AccountId) -> DispatchResult {
845 Self::collection_exists(collection_id)?;1847 Self::collection_exists(collection_id)?;
8461848
847 let target_collection = <Collection<T>>::get(collection_id);1849 let target_collection = <Collection<T>>::get(collection_id);
848 ensure!(1850 ensure!(
849 subject == target_collection.owner,1851 subject == target_collection.owner,
850 "You do not own this collection"1852 Error::<T>::NoPermission
851 );1853 );
8521854
853 Ok(())1855 Ok(())
854 }1856 }
8551857
856 fn is_owner_or_admin_permissions(collection_id: u64, subject: T::AccountId) -> bool {1858 fn is_owner_or_admin_permissions(collection_id: CollectionId, subject: T::AccountId) -> bool {
857
858 let target_collection = <Collection<T>>::get(collection_id);1859 let target_collection = <Collection<T>>::get(collection_id);
859 let mut result: bool = subject == target_collection.owner;1860 let mut result: bool = subject == target_collection.owner;
860 let exists = <AdminList<T>>::contains_key(collection_id);1861 let exists = <AdminList<T>>::contains_key(collection_id);
868 result1869 result
869 }1870 }
8701871
871 fn check_owner_or_admin_permissions(collection_id: u64, subject: T::AccountId) -> DispatchResult {1872 fn check_owner_or_admin_permissions(
872 1873 collection_id: CollectionId,
1874 subject: T::AccountId,
1875 ) -> DispatchResult {
873 Self::collection_exists(collection_id)?;1876 Self::collection_exists(collection_id)?;
874 let result = Self::is_owner_or_admin_permissions(collection_id, subject.clone());1877 let result = Self::is_owner_or_admin_permissions(collection_id, subject.clone());
8751878
876 if result == true {1879 ensure!(
877 Ok(())1880 result,
878 } else {1881 Error::<T>::NoPermission
879 panic!("You do not have permissions to modify this collection")1882 );
880 }1883 Ok(())
881 }1884 }
8821885
883 fn is_item_owner(subject: T::AccountId, collection_id: u64, item_id: u64) -> bool {1886 fn is_item_owner(subject: T::AccountId, collection_id: CollectionId, item_id: TokenId) -> bool {
884 let target_collection = <Collection<T>>::get(collection_id);1887 let target_collection = <Collection<T>>::get(collection_id);
8851888
886 match target_collection.mode {1889 match target_collection.mode {
887 CollectionMode::NFT(_) => {1890 CollectionMode::NFT => {
888 <NftItemList<T>>::get(collection_id, item_id).owner == subject1891 <NftItemList<T>>::get(collection_id, item_id).owner == subject
889 }1892 }
890 CollectionMode::Fungible(_) => {1893 CollectionMode::Fungible(_) => {
891 <FungibleItemList<T>>::get(collection_id, item_id).owner == subject1894 <FungibleItemList<T>>::contains_key(collection_id, &subject)
892 }1895 }
893 CollectionMode::ReFungible(_, _) => {1896 CollectionMode::ReFungible => {
894 <ReFungibleItemList<T>>::get(collection_id, item_id)1897 <ReFungibleItemList<T>>::get(collection_id, item_id)
895 .owner1898 .owner
896 .iter()1899 .iter()
900 }1903 }
901 }1904 }
9021905
903 fn check_white_list(collection_id: u64, address: T::AccountId) -> DispatchResult {1906 fn check_white_list(collection_id: CollectionId, address: &T::AccountId) -> DispatchResult {
1907 let mes = Error::<T>::AddresNotInWhiteList;
1908 ensure!(<WhiteList<T>>::contains_key(collection_id, address), mes);
9041909
905 let mes = "Address is not in white list";
906 if <WhiteList<T>>::contains_key(collection_id){
907 let wl = <WhiteList<T>>::get(collection_id);
908 if !wl.contains(&address.clone()) {
909 panic!(mes);
910 }
911 }
912 else {
913 panic!(mes);
914 }
915 Ok(())1910 Ok(())
916 }1911 }
9171912
918 fn transfer_fungible(1913 /// Check if token exists. In case of Fungible, check if there is an entry for
919 collection_id: u64,
920 item_id: u64,1914 /// the owner in fungible balances double map
921 value: u64,1915 fn token_exists(
1916 collection_id: CollectionId,
922 owner: T::AccountId,1917 item_id: TokenId,
923 new_owner: T::AccountId,1918 owner: &T::AccountId
924 ) -> DispatchResult {1919 ) -> DispatchResult {
1920 let target_collection = <Collection<T>>::get(collection_id);
1921 let exists = match target_collection.mode
1922 {
1923 CollectionMode::NFT => <NftItemList<T>>::contains_key(collection_id, item_id),
1924 CollectionMode::Fungible(_) => <FungibleItemList<T>>::contains_key(collection_id, owner),
1925 CollectionMode::ReFungible => <ReFungibleItemList<T>>::contains_key(collection_id, item_id),
1926 _ => false
1927 };
9251928
926 ensure!(1929 ensure!(exists == true, Error::<T>::TokenNotFound);
927 <FungibleItemList<T>>::contains_key(collection_id, item_id),
928 "Item not exists"1930 Ok(())
929 );1931 }
9301932
931 let full_item = <FungibleItemList<T>>::get(collection_id, item_id);1933 fn transfer_fungible(
1934 collection_id: CollectionId,
1935 value: u128,
1936 owner: &T::AccountId,
1937 recipient: &T::AccountId,
1938 ) -> DispatchResult {
932 let amount = full_item.value;1939 Self::token_exists(collection_id, 0, owner)?;
9331940
934 ensure!(amount >= value.into(), "Item balance not enouth");1941 let mut balance = <FungibleItemList<T>>::get(collection_id, owner);
1942 ensure!(balance.value >= value, Error::<T>::TokenValueTooLow);
9351943
936 // update balance1944 // Send balance to recipient (updates balanceOf of recipient)
937 let balance_old_owner = <Balance<T>>::get(collection_id, owner.clone())
938 .checked_sub(value)
939 .unwrap();1945 Self::add_fungible_item(collection_id, recipient, value)?;
940 <Balance<T>>::insert(collection_id, owner.clone(), balance_old_owner);
9411946
942 let mut new_owner_account_id = 0;1947 // update balanceOf of sender
943 let new_owner_items = <AddressTokens<T>>::get(collection_id, new_owner.clone());1948 <Balance<T>>::insert(collection_id, (*owner).clone(), balance.value - value);
944 if new_owner_items.len() > 0 {
945 new_owner_account_id = new_owner_items[0];
946 }
9471949
948 let val64 = value.into();1950 // Reduce or remove sender
9491951 if balance.value == value {
950 // transfer1952 <FungibleItemList<T>>::remove(collection_id, owner);
951 if amount == val64 && new_owner_account_id == 0 {
952 // change owner
953 // new owner do not have account
954 let mut new_full_item = full_item.clone();
955 new_full_item.owner = new_owner.clone();
956 <FungibleItemList<T>>::insert(collection_id, item_id, new_full_item);
957
958 // update balance
959 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.clone())
960 .checked_add(value)
961 .unwrap();
962 <Balance<T>>::insert(collection_id, new_owner.clone(), balance_new_owner);
963
964 // update index collection
965 Self::move_token_index(collection_id, item_id, owner.clone(), new_owner.clone())?;
966 } else {
967 let mut new_full_item = full_item.clone();
968 new_full_item.value -= val64;
969
970 // separate amount
971 if new_owner_account_id > 0 {
972 // new owner has account
973 let mut item = <FungibleItemList<T>>::get(collection_id, new_owner_account_id);
974 item.value += val64;
975
976 // update balance
977 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.clone())
978 .checked_add(value)
979 .unwrap();
980 <Balance<T>>::insert(collection_id, new_owner.clone(), balance_new_owner);
981
982 <FungibleItemList<T>>::insert(collection_id, new_owner_account_id, item);
983 } else {
984 // new owner do not have account
985 let item = FungibleItemType {
986 collection: collection_id,
987 owner: new_owner.clone(),
988 value: val64,
989 };
990
991 Self::add_fungible_item(item)?;
992 }
993
994 if amount == val64 {
995 Self::remove_token_index(collection_id, item_id, full_item.owner.clone())?;
996
997 // remove approve list
998 <ApprovedList<T>>::remove(collection_id, (item_id, full_item.owner.clone()));
999 <FungibleItemList<T>>::remove(collection_id, item_id);
1000 }
1001
1002 <FungibleItemList<T>>::insert(collection_id, item_id, new_full_item);
1003 }1953 }
1954 else {
1955 balance.value -= value;
1956 <FungibleItemList<T>>::insert(collection_id, (*owner).clone(), balance);
1957 }
10041958
1005 Ok(())1959 Ok(())
1006 }1960 }
10071961
1008 fn transfer_refungible(1962 fn transfer_refungible(
1009 collection_id: u64,1963 collection_id: CollectionId,
1010 item_id: u64,1964 item_id: TokenId,
1011 value: u64,1965 value: u128,
1012 owner: T::AccountId,1966 owner: T::AccountId,
1013 new_owner: T::AccountId,1967 new_owner: T::AccountId,
1014 ) -> DispatchResult {1968 ) -> DispatchResult {
1969 Self::token_exists(collection_id, item_id, &owner)?;
10151970
1016 ensure!(
1017 <ReFungibleItemList<T>>::contains_key(collection_id, item_id),
1018 "Item not exists"
1019 );
1020
1021 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id);1971 let full_item = <ReFungibleItemList<T>>::get(collection_id, item_id);
1022 let item = full_item1972 let item = full_item
1023 .owner1973 .owner
1024 .iter()1974 .iter()
1025 .filter(|i| i.owner == owner)1975 .filter(|i| i.owner == owner)
1026 .next()1976 .next()
1027 .unwrap();1977 .ok_or(Error::<T>::NumOverflow)?;
1028 let amount = item.fraction;1978 let amount = item.fraction;
10291979
1030 ensure!(amount >= value.into(), "Item balance not enouth");1980 ensure!(amount >= value, Error::<T>::TokenValueTooLow);
10311981
1032 // update balance1982 // update balance
1033 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.clone())1983 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.clone())
1034 .checked_sub(value)1984 .checked_sub(value)
1035 .unwrap();1985 .ok_or(Error::<T>::NumOverflow)?;
1036 <Balance<T>>::insert(collection_id, item.owner.clone(), balance_old_owner);1986 <Balance<T>>::insert(collection_id, item.owner.clone(), balance_old_owner);
10371987
1038 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.clone())1988 let balancenew_owner = <Balance<T>>::get(collection_id, new_owner.clone())
1039 .checked_add(value)1989 .checked_add(value)
1040 .unwrap();1990 .ok_or(Error::<T>::NumOverflow)?;
1041 <Balance<T>>::insert(collection_id, new_owner.clone(), balance_new_owner);1991 <Balance<T>>::insert(collection_id, new_owner.clone(), balancenew_owner);
10421992
1043 let old_owner = item.owner.clone();1993 let old_owner = item.owner.clone();
1044 let new_owner_has_account = full_item.owner.iter().any(|i| i.owner == new_owner);1994 let new_owner_has_account = full_item.owner.iter().any(|i| i.owner == new_owner);
1045 let val64 = value.into();
10461995
1047 // transfer1996 // transfer
1048 if amount == val64 && !new_owner_has_account {1997 if amount == value && !new_owner_has_account {
1049 // change owner1998 // change owner
1050 // new owner do not have account1999 // new owner do not have account
1051 let mut new_full_item = full_item.clone();2000 let mut new_full_item = full_item.clone();
1058 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2007 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);
10592008
1060 // update index collection2009 // update index collection
1061 Self::move_token_index(collection_id, item_id, old_owner.clone(), new_owner.clone())?;2010 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;
1062 } else {2011 } else {
1063 let mut new_full_item = full_item.clone();2012 let mut new_full_item = full_item.clone();
1064 new_full_item2013 new_full_item
1065 .owner2014 .owner
1066 .iter_mut()2015 .iter_mut()
1067 .find(|i| i.owner == owner)2016 .find(|i| i.owner == owner)
1068 .unwrap()2017 .unwrap()
1069 .fraction -= val64;2018 .fraction -= value;
10702019
1071 // separate amount2020 // separate amount
1072 if new_owner_has_account {2021 if new_owner_has_account {
1076 .iter_mut()2025 .iter_mut()
1077 .find(|i| i.owner == new_owner)2026 .find(|i| i.owner == new_owner)
1078 .unwrap()2027 .unwrap()
1079 .fraction += val64;2028 .fraction += value;
1080 } else {2029 } else {
1081 // new owner do not have account2030 // new owner do not have account
1082 new_full_item.owner.push(Ownership {2031 new_full_item.owner.push(Ownership {
1083 owner: new_owner.clone(),2032 owner: new_owner.clone(),
1084 fraction: val64,2033 fraction: value,
1085 });2034 });
1086 Self::add_token_index(collection_id, item_id, new_owner.clone())?;2035 Self::add_token_index(collection_id, item_id, &new_owner)?;
1087 }2036 }
10882037
1089 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);2038 <ReFungibleItemList<T>>::insert(collection_id, item_id, new_full_item);
1093 }2042 }
10942043
1095 fn transfer_nft(2044 fn transfer_nft(
1096 collection_id: u64,2045 collection_id: CollectionId,
1097 item_id: u64,2046 item_id: TokenId,
1098 sender: T::AccountId,2047 sender: T::AccountId,
1099 new_owner: T::AccountId,2048 new_owner: T::AccountId,
1100 ) -> DispatchResult {2049 ) -> DispatchResult {
1101 2050 Self::token_exists(collection_id, item_id, &sender)?;
1102 ensure!(
1103 <NftItemList<T>>::contains_key(collection_id, item_id),
1104 "Item not exists"
1105 );
11062051
1107 let mut item = <NftItemList<T>>::get(collection_id, item_id);2052 let mut item = <NftItemList<T>>::get(collection_id, item_id);
11082053
1109 ensure!(2054 ensure!(
1110 sender == item.owner,2055 sender == item.owner,
1111 "sender parameter and item owner must be equal"2056 Error::<T>::MustBeTokenOwner
1112 );2057 );
11132058
1114 // update balance2059 // update balance
1115 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.clone())2060 let balance_old_owner = <Balance<T>>::get(collection_id, item.owner.clone())
1116 .checked_sub(1)2061 .checked_sub(1)
1117 .unwrap();2062 .ok_or(Error::<T>::NumOverflow)?;
1118 <Balance<T>>::insert(collection_id, item.owner.clone(), balance_old_owner);2063 <Balance<T>>::insert(collection_id, item.owner.clone(), balance_old_owner);
11192064
1120 let balance_new_owner = <Balance<T>>::get(collection_id, new_owner.clone())2065 let balancenew_owner = <Balance<T>>::get(collection_id, new_owner.clone())
1121 .checked_add(1)2066 .checked_add(1)
1122 .unwrap();2067 .ok_or(Error::<T>::NumOverflow)?;
1123 <Balance<T>>::insert(collection_id, new_owner.clone(), balance_new_owner);2068 <Balance<T>>::insert(collection_id, new_owner.clone(), balancenew_owner);
11242069
1125 // change owner2070 // change owner
1126 let old_owner = item.owner.clone();2071 let old_owner = item.owner.clone();
1127 item.owner = new_owner.clone();2072 item.owner = new_owner.clone();
1128 <NftItemList<T>>::insert(collection_id, item_id, item);2073 <NftItemList<T>>::insert(collection_id, item_id, item);
11292074
1130 // update index collection2075 // update index collection
1131 Self::move_token_index(collection_id, item_id, old_owner.clone(), new_owner.clone())?;2076 Self::move_token_index(collection_id, item_id, &old_owner, &new_owner)?;
11322077
1133 // reset approved list
1134 <ApprovedList<T>>::remove(collection_id, (item_id, old_owner));
1135 Ok(())2078 Ok(())
1136 }2079 }
2080
2081 fn set_re_fungible_variable_data(
2082 collection_id: CollectionId,
2083 item_id: TokenId,
2084 data: Vec<u8>
2085 ) -> DispatchResult {
2086 let mut item = <ReFungibleItemList<T>>::get(collection_id, item_id);
11372087
1138 fn add_token_index(collection_id: u64, item_index: u64, owner: T::AccountId) -> DispatchResult {2088 item.variable_data = data;
1139 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.clone());2089
2090 <ReFungibleItemList<T>>::insert(collection_id, item_id, item);
2091
2092 Ok(())
2093 }
2094
2095 fn set_nft_variable_data(
2096 collection_id: CollectionId,
2097 item_id: TokenId,
2098 data: Vec<u8>
2099 ) -> DispatchResult {
2100 let mut item = <NftItemList<T>>::get(collection_id, item_id);
2101
2102 item.variable_data = data;
2103
2104 <NftItemList<T>>::insert(collection_id, item_id, item);
2105
2106 Ok(())
2107 }
2108
2109 fn init_collection(item: &CollectionType<T::AccountId>) {
2110 // check params
2111 assert!(
2112 item.decimal_points <= MAX_DECIMAL_POINTS,
2113 "decimal_points parameter must be lower than MAX_DECIMAL_POINTS"
2114 );
2115 assert!(
2116 item.name.len() <= 64,
2117 "Collection name can not be longer than 63 char"
2118 );
2119 assert!(
2120 item.name.len() <= 256,
2121 "Collection description can not be longer than 255 char"
2122 );
2123 assert!(
2124 item.token_prefix.len() <= 16,
2125 "Token prefix can not be longer than 15 char"
2126 );
2127
2128 // Generate next collection ID
2129 let next_id = CreatedCollectionCount::get()
2130 .checked_add(1)
2131 .unwrap();
2132
2133 CreatedCollectionCount::put(next_id);
2134 }
2135
2136 fn init_nft_token(collection_id: CollectionId, item: &NftItemType<T::AccountId>) {
2137 let current_index = <ItemListIndex>::get(collection_id)
2138 .checked_add(1)
2139 .unwrap();
2140
2141 let item_owner = item.owner.clone();
2142 Self::add_token_index(collection_id, current_index, &item.owner).unwrap();
2143
2144 <ItemListIndex>::insert(collection_id, current_index);
2145
2146 // Update balance
2147 let new_balance = <Balance<T>>::get(collection_id, &item_owner)
2148 .checked_add(1)
2149 .unwrap();
2150 <Balance<T>>::insert(collection_id, item_owner.clone(), new_balance);
2151 }
2152
2153 fn init_fungible_token(collection_id: CollectionId, owner: &T::AccountId, item: &FungibleItemType) {
2154 let current_index = <ItemListIndex>::get(collection_id)
2155 .checked_add(1)
2156 .unwrap();
2157
2158 Self::add_token_index(collection_id, current_index, owner).unwrap();
2159
2160 <ItemListIndex>::insert(collection_id, current_index);
2161
2162 // Update balance
2163 let new_balance = <Balance<T>>::get(collection_id, owner)
2164 .checked_add(item.value)
2165 .unwrap();
2166 <Balance<T>>::insert(collection_id, (*owner).clone(), new_balance);
2167 }
2168
2169 fn init_refungible_token(collection_id: CollectionId, item: &ReFungibleItemType<T::AccountId>) {
2170 let current_index = <ItemListIndex>::get(collection_id)
2171 .checked_add(1)
2172 .unwrap();
2173
2174 let value = item.owner.first().unwrap().fraction;
2175 let owner = item.owner.first().unwrap().owner.clone();
2176
2177 Self::add_token_index(collection_id, current_index, &owner).unwrap();
2178
2179 <ItemListIndex>::insert(collection_id, current_index);
2180
2181 // Update balance
2182 let new_balance = <Balance<T>>::get(collection_id, &owner)
2183 .checked_add(value)
2184 .unwrap();
2185 <Balance<T>>::insert(collection_id, owner.clone(), new_balance);
2186 }
2187
2188 fn add_token_index(collection_id: CollectionId, item_index: TokenId, owner: &T::AccountId) -> DispatchResult {
2189
2190 // add to account limit
2191 if <AccountItemCount<T>>::contains_key(owner) {
2192
2193 // bound Owned tokens by a single address
2194 let count = <AccountItemCount<T>>::get(owner);
2195 ensure!(count < ChainLimit::get().account_token_ownership_limit, Error::<T>::AddressOwnershipLimitExceeded);
2196
2197 <AccountItemCount<T>>::insert(owner.clone(), count
2198 .checked_add(1)
2199 .ok_or(Error::<T>::NumOverflow)?);
2200 }
2201 else {
2202 <AccountItemCount<T>>::insert(owner.clone(), 1);
2203 }
2204
2205 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner);
1140 if list_exists {2206 if list_exists {
1141 let mut list = <AddressTokens<T>>::get(collection_id, owner.clone());2207 let mut list = <AddressTokens<T>>::get(collection_id, owner);
1142 let item_contains = list.contains(&item_index.clone());2208 let item_contains = list.contains(&item_index.clone());
11432209
1144 if !item_contains {2210 if !item_contains {
1149 } else {2215 } else {
1150 let mut itm = Vec::new();2216 let mut itm = Vec::new();
1151 itm.push(item_index.clone());2217 itm.push(item_index.clone());
1152 <AddressTokens<T>>::insert(collection_id, owner, itm);2218 <AddressTokens<T>>::insert(collection_id, owner.clone(), itm);
1153 }2219 }
11542220
1155 Ok(())2221 Ok(())
1156 }2222 }
11572223
1158 fn remove_token_index(2224 fn remove_token_index(
1159 collection_id: u64,2225 collection_id: CollectionId,
1160 item_index: u64,2226 item_index: TokenId,
1161 owner: T::AccountId,2227 owner: &T::AccountId,
1162 ) -> DispatchResult {2228 ) -> DispatchResult {
2229
1163 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner.clone());2230 // update counter
2231 <AccountItemCount<T>>::insert(owner.clone(),
2232 <AccountItemCount<T>>::get(owner)
2233 .checked_sub(1)
2234 .ok_or(Error::<T>::NumOverflow)?);
2235
2236
2237 let list_exists = <AddressTokens<T>>::contains_key(collection_id, owner);
1164 if list_exists {2238 if list_exists {
1165 let mut list = <AddressTokens<T>>::get(collection_id, owner.clone());2239 let mut list = <AddressTokens<T>>::get(collection_id, owner);
1166 let item_contains = list.contains(&item_index.clone());2240 let item_contains = list.contains(&item_index.clone());
11672241
1168 if item_contains {2242 if item_contains {
1169 list.retain(|&item| item != item_index);2243 list.retain(|&item| item != item_index);
1170 <AddressTokens<T>>::insert(collection_id, owner, list);2244 <AddressTokens<T>>::insert(collection_id, owner.clone(), list);
1171 }2245 }
1172 }2246 }
11732247
1174 Ok(())2248 Ok(())
1175 }2249 }
11762250
1177 fn move_token_index(2251 fn move_token_index(
1178 collection_id: u64,2252 collection_id: CollectionId,
1179 item_index: u64,2253 item_index: TokenId,
1180 old_owner: T::AccountId,2254 old_owner: &T::AccountId,
1181 new_owner: T::AccountId,2255 new_owner: &T::AccountId,
1182 ) -> DispatchResult {2256 ) -> DispatchResult {
1183 Self::remove_token_index(collection_id, item_index, old_owner)?;2257 Self::remove_token_index(collection_id, item_index, old_owner)?;
1184 Self::add_token_index(collection_id, item_index, new_owner)?;2258 Self::add_token_index(collection_id, item_index, new_owner)?;
11852259
1186 Ok(())2260 Ok(())
1187 }2261 }
2262
2263 fn ensure_contract_owned(account: T::AccountId, contract: &T::AccountId) -> DispatchResult {
2264 if <ContractOwner<T>>::contains_key(contract.clone()) {
2265 let owner = <ContractOwner<T>>::get(contract);
2266 ensure!(account == owner, Error::<T>::NoPermission);
2267 } else {
2268 fail!(Error::<T>::NoPermission);
2269 }
2270
2271 Ok(())
2272 }
1188}2273}
11892274
1190////////////////////////////////////////////////////////////////////////////////////////////////////2275////////////////////////////////////////////////////////////////////////////////////////////////////
1191// Economic models2276// Economic models
2277// #region
11922278
1193/// Fee multiplier.2279/// Fee multiplier.
1194pub type Multiplier = FixedU128;2280pub type Multiplier = FixedU128;
11952281
1196type BalanceOf<T> = <<T as transaction_payment::Trait>::Currency as Currency<2282type BalanceOf<T> = <<T as transaction_payment::Config>::OnChargeTransaction as transaction_payment::OnChargeTransaction<T>>::Balance;
1197 <T as system::Trait>::AccountId,
1198>>::Balance;
1199type NegativeImbalanceOf<T> = <<T as transaction_payment::Trait>::Currency as Currency<
1200 <T as system::Trait>::AccountId,
1201>>::NegativeImbalance;
12022283
1203/// Require the transactor pay for themselves and maybe include a tip to gain additional priority2284/// Require the transactor pay for themselves and maybe include a tip to gain additional priority
1204/// in the queue.2285/// in the queue.
1205#[derive(Encode, Decode, Clone, Eq, PartialEq)]2286#[derive(Encode, Decode, Clone, Eq, PartialEq)]
1206pub struct ChargeTransactionPayment<T: transaction_payment::Trait + Send + Sync>(2287pub struct ChargeTransactionPayment<T: Config>(#[codec(compact)] BalanceOf<T>);
1207 #[codec(compact)] BalanceOf<T>,
1208);
12092288
1210impl<T: Trait + transaction_payment::Trait + Send + Sync> sp_std::fmt::Debug2289impl<T: Config + Send + Sync> sp_std::fmt::Debug
1211 for ChargeTransactionPayment<T>2290 for ChargeTransactionPayment<T>
1212{2291{
1213 #[cfg(feature = "std")]2292 #[cfg(feature = "std")]
1214 fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {2293 fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
1215 write!(f, "ChargeTransactionPayment<{:?}>", self.0)2294 write!(f, "ChargeTransactionPayment<{:?}>", self.0)
1216 }2295 }
1217 #[cfg(not(feature = "std"))]2296 #[cfg(not(feature = "std"))]
1218 fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {2297 fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
1219 Ok(())2298 Ok(())
1220 }2299 }
1221}2300}
12222301
1223impl<T: Trait + transaction_payment::Trait + Send + Sync> ChargeTransactionPayment<T>2302impl<T: Config> ChargeTransactionPayment<T>
1224where2303where
1225 T::Call:2304 T::Call: Dispatchable<Info=DispatchInfo, PostInfo=PostDispatchInfo> + IsSubType<Call<T>> + IsSubType<pallet_contracts::Call<T>>,
1226 Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo> + IsSubType<Module<T>, T>,
1227 BalanceOf<T>: Send + Sync + FixedPointOperand,2305 BalanceOf<T>: Send + Sync + From<u64> + FixedPointOperand,
2306 T::AccountId: AsRef<[u8]>,
2307 T::AccountId: UncheckedFrom<T::Hash>,
1228{2308{
1229 /// utility constructor. Used only in client/factory code.2309 fn traditional_fee(
1230 pub fn from(fee: BalanceOf<T>) -> Self {
1231 Self(fee)
1232 }
1233
1234 pub fn traditional_fee(
1235 len: usize,2310 len: usize,
1236 info: &DispatchInfoOf<T::Call>,2311 info: &DispatchInfoOf<T::Call>,
1237 tip: BalanceOf<T>,2312 tip: BalanceOf<T>,
1242 <transaction_payment::Module<T>>::compute_fee(len as u32, info, tip)2317 <transaction_payment::Module<T>>::compute_fee(len as u32, info, tip)
1243 }2318 }
12442319
2320 fn get_priority(len: usize, info: &DispatchInfoOf<T::Call>, final_fee: BalanceOf<T>) -> TransactionPriority {
2321 let weight_saturation = T::BlockWeights::get().max_block / info.weight.max(1);
2322 let max_block_length = *T::BlockLength::get().max.get(DispatchClass::Normal);
2323 let len_saturation = max_block_length as u64 / (len as u64).max(1);
2324 let coefficient: BalanceOf<T> = weight_saturation
2325 .min(len_saturation)
2326 .saturated_into::<BalanceOf<T>>();
2327 final_fee
2328 .saturating_mul(coefficient)
2329 .saturated_into::<TransactionPriority>()
2330 }
2331
1245 fn withdraw_fee(2332 fn withdraw_fee(
1246 &self,2333 &self,
1247 who: &T::AccountId,2334 who: &T::AccountId,
1248 call: &T::Call,2335 call: &T::Call,
1249 info: &DispatchInfoOf<T::Call>,2336 info: &DispatchInfoOf<T::Call>,
1250 len: usize,2337 len: usize,
1251 ) -> Result<(BalanceOf<T>, Option<NegativeImbalanceOf<T>>), TransactionValidityError> {2338 ) -> Result<
2339 (
2340 BalanceOf<T>,
2341 <<T as transaction_payment::Config>::OnChargeTransaction as transaction_payment::OnChargeTransaction<T>>::LiquidityInfo,
2342 ),
2343 TransactionValidityError,
2344 > {
1252 let tip = self.0;2345 let tip = self.0;
12532346
1254 // Set fee based on call type. Creating collection costs 1 Unique.2347 // Set fee based on call type. Creating collection costs 1 Unique.
1255 // All other transactions have traditional fees so far2348 // All other transactions have traditional fees so far
1256 let fee = match call.is_sub_type() {2349 // let fee = match call.is_sub_type() {
1257 Some(Call::create_collection(..)) => <BalanceOf<T>>::from(1_000_000_000),2350 // Some(Call::create_collection(..)) => <BalanceOf<T>>::from(1_000_000_000),
1258 _ => Self::traditional_fee(len, info, tip), // Flat fee model, use only for testing purposes2351 // _ => Self::traditional_fee(len, info, tip), // Flat fee model, use only for testing purposes
1259 // _ => <BalanceOf<T>>::from(100)2352 // // _ => <BalanceOf<T>>::from(100)
1260 };2353 // };
2354 let fee = Self::traditional_fee(len, info, tip);
12612355
2356 // Only mess with balances if fee is not zero.
2357 if fee.is_zero() {
2358 return <<T as transaction_payment::Config>::OnChargeTransaction as transaction_payment::OnChargeTransaction<T>>::withdraw_fee(who, call, info, fee, tip)
2359 .map(|i| (fee, i));
2360 }
2361
1262 // Determine who is paying transaction fee based on ecnomic model2362 // Determine who is paying transaction fee based on ecnomic model
1263 // Parse call to extract collection ID and access collection sponsor2363 // Parse call to extract collection ID and access collection sponsor
1264 let sponsor: T::AccountId = match call.is_sub_type() {2364 let mut sponsor: T::AccountId = match IsSubType::<Call<T>>::is_sub_type(call) {
1265 Some(Call::create_item(collection_id, _properties, _owner)) => {2365 Some(Call::create_item(collection_id, _owner, _properties)) => {
2366
2367 // sponsor timeout
2368 let block_number = <system::Module<T>>::block_number() as T::BlockNumber;
2369
2370 let limit = <Collection<T>>::get(collection_id).limits.sponsor_transfer_timeout;
2371 let mut sponsored = true;
2372 if <CreateItemBasket<T>>::contains_key((collection_id, &who)) {
2373 let last_tx_block = <CreateItemBasket<T>>::get((collection_id, &who));
2374 let limit_time = last_tx_block + limit.into();
2375 if block_number <= limit_time {
1266 <Collection<T>>::get(collection_id).sponsor2376 sponsored = false;
2377 }
2378 }
2379 if sponsored {
2380 <CreateItemBasket<T>>::insert((collection_id, who.clone()), block_number);
2381 }
2382
2383 // check free create limit
2384 if (<Collection<T>>::get(collection_id).limits.sponsored_data_size >= (_properties.len() as u32)) &&
2385 (<Collection<T>>::get(collection_id).sponsor_confirmed) &&
2386 (sponsored)
2387 {
2388 <Collection<T>>::get(collection_id).sponsor
2389 } else {
2390 T::AccountId::default()
2391 }
1267 }2392 }
1268 Some(Call::transfer(_new_owner, collection_id, _item_id, _value)) => {2393 Some(Call::transfer(_new_owner, collection_id, item_id, _value)) => {
1269 <Collection<T>>::get(collection_id).sponsor2394
2395 let mut sponsor_transfer = false;
2396 if <Collection<T>>::get(collection_id).sponsor_confirmed {
2397
2398 let collection_limits = <Collection<T>>::get(collection_id).limits;
2399 let collection_mode = <Collection<T>>::get(collection_id).mode;
2400
2401 // sponsor timeout
2402 let block_number = <system::Module<T>>::block_number() as T::BlockNumber;
2403 sponsor_transfer = match collection_mode {
2404 CollectionMode::NFT => {
2405
2406 // get correct limit
2407 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {
2408 collection_limits.sponsor_transfer_timeout
2409 } else {
2410 ChainLimit::get().nft_sponsor_transfer_timeout
2411 };
2412
2413 let mut sponsored = true;
2414 if <NftTransferBasket<T>>::contains_key(collection_id, item_id) {
2415 let last_tx_block = <NftTransferBasket<T>>::get(collection_id, item_id);
2416 let limit_time = last_tx_block + limit.into();
2417 if block_number <= limit_time {
2418 sponsored = false;
2419 }
2420 }
2421 if sponsored {
2422 <NftTransferBasket<T>>::insert(collection_id, item_id, block_number);
2423 }
2424
2425 sponsored
2426 }
2427 CollectionMode::Fungible(_) => {
2428
2429 // get correct limit
2430 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {
2431 collection_limits.sponsor_transfer_timeout
2432 } else {
2433 ChainLimit::get().fungible_sponsor_transfer_timeout
2434 };
2435
2436 let block_number = <system::Module<T>>::block_number() as T::BlockNumber;
2437 let mut sponsored = true;
2438 if <FungibleTransferBasket<T>>::contains_key(collection_id, who) {
2439 let last_tx_block = <FungibleTransferBasket<T>>::get(collection_id, who);
2440 let limit_time = last_tx_block + limit.into();
2441 if block_number <= limit_time {
2442 sponsored = false;
2443 }
2444 }
2445 if sponsored {
2446 <FungibleTransferBasket<T>>::insert(collection_id, who, block_number);
2447 }
2448
2449 sponsored
2450 }
2451 CollectionMode::ReFungible => {
2452
2453 // get correct limit
2454 let limit: u32 = if collection_limits.sponsor_transfer_timeout > 0 {
2455 collection_limits.sponsor_transfer_timeout
2456 } else {
2457 ChainLimit::get().refungible_sponsor_transfer_timeout
2458 };
2459
2460 let mut sponsored = true;
2461 if <ReFungibleTransferBasket<T>>::contains_key(collection_id, item_id) {
2462 let last_tx_block = <ReFungibleTransferBasket<T>>::get(collection_id, item_id);
2463 let limit_time = last_tx_block + limit.into();
2464 if block_number <= limit_time {
2465 sponsored = false;
2466 }
2467 }
2468 if sponsored {
2469 <ReFungibleTransferBasket<T>>::insert(collection_id, item_id, block_number);
2470 }
2471
2472 sponsored
2473 }
2474 _ => {
2475 false
2476 },
2477 };
2478 }
2479
2480 if !sponsor_transfer {
2481 T::AccountId::default()
2482 } else {
2483 <Collection<T>>::get(collection_id).sponsor
2484 }
1270 }2485 }
12712486
1272 _ => T::AccountId::default(),2487 _ => T::AccountId::default(),
1273 };2488 };
12742489
2490 // Sponsor smart contracts
2491 sponsor = match IsSubType::<pallet_contracts::Call<T>>::is_sub_type(call) {
2492
2493 // On instantiation: set the contract owner
2494 Some(pallet_contracts::Call::instantiate(_endowment, _gas_limit, code_hash, _data, salt)) => {
2495
2496 let new_contract_address = <pallet_contracts::Module<T>>::contract_address(
2497 &who,
2498 code_hash,
2499 salt,
2500 );
2501 <ContractOwner<T>>::insert(new_contract_address.clone(), who.clone());
2502
2503 T::AccountId::default()
2504 },
2505
2506 // When the contract is called, check if the sponsoring is enabled and pay fees from contract endowment if it is
2507 Some(pallet_contracts::Call::call(dest, _value, _gas_limit, _data)) => {
2508
2509 let called_contract: T::AccountId = T::Lookup::lookup((*dest).clone()).unwrap_or(T::AccountId::default());
2510
2511 let owned_contract = <ContractOwner<T>>::contains_key(called_contract.clone())
2512 && <ContractOwner<T>>::get(called_contract.clone()) == *who;
2513 let white_list_enabled = <ContractWhiteListEnabled<T>>::contains_key(called_contract.clone()) && <ContractWhiteListEnabled<T>>::get(called_contract.clone());
2514
2515 if !owned_contract && white_list_enabled {
2516 if !<ContractWhiteList<T>>::contains_key(called_contract.clone(), who) {
2517 return Err(InvalidTransaction::Call.into());
2518 }
2519 }
2520
2521 let mut sponsor_transfer = false;
2522 if <ContractSponsoringRateLimit<T>>::contains_key(called_contract.clone()) {
2523 let last_tx_block = <ContractSponsorBasket<T>>::get((&called_contract, &who));
2524 let block_number = <system::Module<T>>::block_number() as T::BlockNumber;
2525 let rate_limit = <ContractSponsoringRateLimit<T>>::get(&called_contract);
2526 let limit_time = last_tx_block + rate_limit;
2527
2528 if block_number >= limit_time {
2529 <ContractSponsorBasket<T>>::insert((called_contract.clone(), who.clone()), block_number);
2530 sponsor_transfer = true;
2531 }
2532 } else {
2533 sponsor_transfer = false;
2534 }
2535
2536
2537 let mut sp = T::AccountId::default();
2538 if sponsor_transfer {
2539 if <ContractSelfSponsoring<T>>::contains_key(called_contract.clone()) {
2540 if <ContractSelfSponsoring<T>>::get(called_contract.clone()) {
2541 sp = called_contract;
2542 }
2543 }
2544 }
2545
2546 sp
2547 },
2548
2549 _ => sponsor,
2550 };
2551
1275 let mut who_pays_fee: T::AccountId = sponsor.clone();2552 let mut who_pays_fee: T::AccountId = sponsor.clone();
1276 if sponsor == T::AccountId::default() {2553 if sponsor == T::AccountId::default() {
1277 who_pays_fee = who.clone();2554 who_pays_fee = who.clone();
1278 }2555 }
12792556
1280 // Only mess with balances if fee is not zero.
1281 if fee.is_zero() {
1282 return Ok((fee, None));
1283 }
1284
1285 match <T as transaction_payment::Trait>::Currency::withdraw(2557 <<T as transaction_payment::Config>::OnChargeTransaction as transaction_payment::OnChargeTransaction<T>>::withdraw_fee(&who_pays_fee, call, info, fee, tip)
1286 &who_pays_fee,
1287 fee,
1288 if tip.is_zero() {
1289 WithdrawReason::TransactionPayment.into()2558 .map(|i| (fee, i))
1290 } else {
1291 WithdrawReason::TransactionPayment | WithdrawReason::Tip
1292 },
1293 ExistenceRequirement::KeepAlive,
1294 ) {
1295 Ok(imbalance) => Ok((fee, Some(imbalance))),
1296 Err(_) => Err(InvalidTransaction::Payment.into()),
1297 }
1298 }2559 }
1299}2560}
13002561
2562
1301impl<T: Trait + transaction_payment::Trait + Send + Sync> SignedExtension2563impl<T: Config + Send + Sync> SignedExtension
1302 for ChargeTransactionPayment<T>2564 for ChargeTransactionPayment<T>
1303where2565where
1304 BalanceOf<T>: Send + Sync + From<u64> + FixedPointOperand,2566 BalanceOf<T>: Send + Sync + From<u64> + FixedPointOperand,
1305 T::Call:2567 T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo> + IsSubType<Call<T>> + IsSubType<pallet_contracts::Call<T>>,
1306 Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo> + IsSubType<Module<T>, T>,2568 T::AccountId: AsRef<[u8]>,
2569 T::AccountId: UncheckedFrom<T::Hash>,
1307{2570{
1308 const IDENTIFIER: &'static str = "ChargeTransactionPayment";2571 const IDENTIFIER: &'static str = "ChargeTransactionPayment";
1309 type AccountId = T::AccountId;2572 type AccountId = T::AccountId;
1310 type Call = T::Call;2573 type Call = T::Call;
1311 type AdditionalSigned = ();2574 type AdditionalSigned = ();
1312 type Pre = (2575 type Pre = (
2576 // tip
1313 BalanceOf<T>,2577 BalanceOf<T>,
2578 // who pays fee
1314 Self::AccountId,2579 Self::AccountId,
1315 Option<NegativeImbalanceOf<T>>,2580 // imbalance resulting from withdrawing the fee
1316 BalanceOf<T>,2581 <<T as transaction_payment::Config>::OnChargeTransaction as transaction_payment::OnChargeTransaction<T>>::LiquidityInfo,
1317 );2582 );
1318 fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> {2583 fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> {
1319 Ok(())2584 Ok(())
1326 info: &DispatchInfoOf<Self::Call>,2591 info: &DispatchInfoOf<Self::Call>,
1327 len: usize,2592 len: usize,
1328 ) -> TransactionValidity {2593 ) -> TransactionValidity {
1329 let (fee, _) = self.withdraw_fee(who, call, info, len)?;2594 let (fee, _) = self.withdraw_fee(who, call, info, len)?;
13302595 Ok(ValidTransaction {
1331 let mut r = ValidTransaction::default();2596 priority: Self::get_priority(len, info, fee),
1332 // NOTE: we probably want to maximize the _fee (of any type) per weight unit_ here, which
1333 // will be a bit more than setting the priority to tip. For now, this is enough.2597 ..Default::default()
1334 r.priority = fee.saturated_into::<TransactionPriority>();
1335 Ok(r)2598 })
1336 }2599 }
13372600
1338 fn pre_dispatch(2601 fn pre_dispatch(
1342 info: &DispatchInfoOf<Self::Call>,2605 info: &DispatchInfoOf<Self::Call>,
1343 len: usize,2606 len: usize,
1344 ) -> Result<Self::Pre, TransactionValidityError> {2607 ) -> Result<Self::Pre, TransactionValidityError> {
1345 let (fee, imbalance) = self.withdraw_fee(who, call, info, len)?;2608 let (_fee, imbalance) = self.withdraw_fee(who, call, info, len)?;
1346 Ok((self.0, who.clone(), imbalance, fee))2609 Ok((self.0, who.clone(), imbalance))
1347 }2610 }
13482611
1349 fn post_dispatch(2612 fn post_dispatch(
1353 len: usize,2616 len: usize,
1354 _result: &DispatchResult,2617 _result: &DispatchResult,
1355 ) -> Result<(), TransactionValidityError> {2618 ) -> Result<(), TransactionValidityError> {
1356 let (tip, who, imbalance, fee) = pre;2619 let (tip, who, imbalance) = pre;
1357 if let Some(payed) = imbalance {2620 let actual_fee = transaction_payment::Module::<T>::compute_actual_fee(
1358 let actual_fee = <transaction_payment::Module<T>>::compute_actual_fee(
1359 len as u32, info, post_info, tip,2621 len as u32,
2622 info,
2623 post_info,
2624 tip,
1360 );2625 );
1361 let refund = fee.saturating_sub(actual_fee);
1362 let actual_payment =
1363 match <T as transaction_payment::Trait>::Currency::deposit_into_existing(2626 <T as transaction_payment::Config>::OnChargeTransaction::correct_and_deposit_fee(&who, info, post_info, actual_fee, tip, imbalance)?;
1364 &who, refund,
1365 ) {
1366 Ok(refund_imbalance) => {
1367 // The refund cannot be larger than the up front payed max weight.
1368 // `PostDispatchInfo::calc_unspent` guards against such a case.
1369 match payed.offset(refund_imbalance) {
1370 Ok(actual_payment) => actual_payment,
1371 Err(_) => return Err(InvalidTransaction::Payment.into()),
1372 }
1373 }
1374 // We do not recreate the account using the refund. The up front payment
1375 // is gone in that case.
1376 Err(_) => payed,
1377 };
1378 let imbalances = actual_payment.split(tip);
1379 <T as transaction_payment::Trait>::OnTransactionPayment::on_unbalanceds(
1380 Some(imbalances.0).into_iter().chain(Some(imbalances.1)),
1381 );
1382 }
1383 Ok(())2627 Ok(())
1384 }2628 }
1385}2629}
2630
2631// #endregion
13862632
modifiedpallets/nft/src/mock.rsdiffbeforeafterboth
1// Creating mock runtime here1// Creating mock runtime here
22
3use crate::{Module, Trait};3use crate::{Module, Config};
4
4use frame_support::{5use frame_support::{
5 impl_outer_origin, parameter_types,6 impl_outer_origin, parameter_types,
6 weights::{7 weights::{Weight, IdentityFee},
7 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},
8 Weight,
9 },
10};8};
11use frame_system as system;9use frame_system as system;
10use system::limits::{BlockLength, BlockWeights};
11use transaction_payment::{self, CurrencyAdapter};
12use sp_core::H256;12use sp_core::H256;
13use sp_runtime::{13use sp_runtime::{
14 testing::Header,14 testing::Header,
15 traits::{BlakeTwo256, IdentityLookup, Saturating},15 traits::{BlakeTwo256, IdentityLookup},
16 Perbill,16 Perbill,
17};17};
18use pallet_contracts::WeightInfo;
19pub use pallet_balances;
1820
19impl_outer_origin! {21impl_outer_origin! {
20 pub enum Origin for Test {}22 pub enum Origin for Test {}
27pub struct Test;29pub struct Test;
28parameter_types! {30parameter_types! {
29 pub const BlockHashCount: u64 = 250;31 pub const BlockHashCount: u64 = 250;
30 pub const MaximumBlockWeight: Weight = 1024;32 pub TestBlockWeights: BlockWeights = BlockWeights::default();
31 pub const MaximumBlockLength: u32 = 2 * 1024;33 pub TestBlockLength: BlockLength = BlockLength::default();
32 pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
33 pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()34 pub SS58Prefix: u8 = 0;
34 .saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();
35}35}
3636
37impl system::Trait for Test {37impl system::Config for Test {
38 type BaseCallFilter = ();
38 type Origin = Origin;39 type Origin = Origin;
39 type Call = ();40 type Call = ();
40 type Index = u64;41 type Index = u64;
46 type Header = Header;47 type Header = Header;
47 type Event = ();48 type Event = ();
48 type BlockHashCount = BlockHashCount;49 type BlockHashCount = BlockHashCount;
49 type MaximumBlockWeight = MaximumBlockWeight;50 type BlockWeights = TestBlockWeights;
50 type MaximumBlockLength = MaximumBlockLength;51 type DbWeight = ();
51 type AvailableBlockRatio = AvailableBlockRatio;52 type BlockLength = TestBlockLength;
52 type BaseCallFilter = ();53 type Version = ();
53 type DbWeight = RocksDbWeight;54 type PalletInfo = ();
54 type BlockExecutionWeight = BlockExecutionWeight;55 type AccountData = pallet_balances::AccountData<u64>;
55 type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
56 type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
57 type Version = ();56 type OnNewAccount = ();
58 type ModuleToIndex = ();57 type OnKilledAccount = ();
59 type AccountData = ();58 type SS58Prefix = SS58Prefix;
60 type OnNewAccount = ();59 type SystemWeightInfo = ();
61 type OnKilledAccount = ();
62}60}
61
62parameter_types! {
63 pub const ExistentialDeposit: u64 = 1;
64 pub const MaxLocks: u32 = 50;
65}
66
67type System = frame_system::Module<Test>;
68impl pallet_balances::Config for Test {
69 type AccountStore = System;
70 type Balance = u64;
71 type DustRemoval = ();
72 type Event = ();
73 type ExistentialDeposit = ExistentialDeposit;
74 type WeightInfo = ();
75 type MaxLocks = MaxLocks;
76}
77
78parameter_types! {
79 pub const TransactionByteFee: u64 = 1;
80}
81
82impl transaction_payment::Config for Test {
83 type OnChargeTransaction = CurrencyAdapter<pallet_balances::Module<Test>, ()>;
84 type TransactionByteFee = TransactionByteFee;
85 type WeightToFee = IdentityFee<u64>;
86 type FeeMultiplierUpdate = ();
87}
88
89
90parameter_types! {
91 pub const MinimumPeriod: u64 = 1;
92}
93impl pallet_timestamp::Config for Test {
94 type Moment = u64;
95 type OnTimestampSet = ();
96 type MinimumPeriod = MinimumPeriod;
97 type WeightInfo = ();
98}
99
100type Timestamp = pallet_timestamp::Module<Test>;
101type Randomness = pallet_randomness_collective_flip::Module<Test>;
102
103parameter_types! {
104 pub const TombstoneDeposit: u64 = 1;
105 pub const DepositPerContract: u64 = 1;
106 pub const DepositPerStorageByte: u64 = 1;
107 pub const DepositPerStorageItem: u64 = 1;
108 pub RentFraction: Perbill = Perbill::from_rational_approximation(1u32, 30 * 24 * 60 * 10);
109 pub const SurchargeReward: u64 = 1;
110 pub const SignedClaimHandicap: u32 = 2;
111 pub const MaxDepth: u32 = 32;
112 pub const MaxValueSize: u32 = 16 * 1024;
113 pub DeletionWeightLimit: Weight = Perbill::from_percent(10) *
114 TestBlockWeights::get().max_block;
115 pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (
116 <Test as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -
117 <Test as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)
118 )) / 5) as u32;
119}
120
63impl Trait for Test {121impl pallet_contracts::Config for Test {
122 type Time = Timestamp;
123 type Randomness = Randomness;
124 type Currency = pallet_balances::Module<Test>;
64 type Event = ();125 type Event = ();
126 type RentPayment = ();
127 type SignedClaimHandicap = SignedClaimHandicap;
128 type TombstoneDeposit = TombstoneDeposit;
129 type DepositPerContract = DepositPerContract;
130 type DepositPerStorageByte = DepositPerStorageByte;
131 type DepositPerStorageItem = DepositPerStorageItem;
132 type RentFraction = RentFraction;
133 type SurchargeReward = SurchargeReward;
134 type DeletionWeightLimit = DeletionWeightLimit;
135 type MaxDepth = MaxDepth;
136 type DeletionQueueDepth = DeletionQueueDepth;
137 type MaxValueSize = MaxValueSize;
138 type ChainExtension = ();
139 type WeightPrice = ();
140 type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;
65}141}
142
143impl Config for Test {
144 type Event = ();
145 type WeightInfo = ();
146
147}
66pub type TemplateModule = Module<Test>;148pub type TemplateModule = Module<Test>;
149
67150
modifiedpallets/nft/src/tests.rsdiffbeforeafterboth
1// Tests to be written here1// Tests to be written here
2use super::*;
2use crate::mock::*;3use crate::mock::*;
3use crate::{ApprovePermissions, CollectionMode, AccessMode, Ownership};4use crate::{AccessMode, CollectionMode,
5 Ownership, ChainLimits, CreateItemData, CreateNftData, CreateFungibleData, CreateReFungibleData,
6 CollectionId, TokenId, MAX_DECIMAL_POINTS};
4use frame_support::{assert_noop, assert_ok};7use frame_support::{assert_noop, assert_ok};
8use frame_system::{ RawOrigin };
59
6#[test]
7fn create_nft_item() {10fn default_collection_numbers_limit() -> u32 {
8 new_test_ext().execute_with(|| {
9 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();11 10
10 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();12}
11 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
12 let mode: CollectionMode = CollectionMode::NFT(2000);
1313
14 let origin1 = Origin::signed(1);14fn default_limits() {
15 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
16 collection_numbers_limit: default_collection_numbers_limit(),
17 account_token_ownership_limit: 10,
18 collections_admins_limit: 5,
19 custom_data_limit: 2048,
20 nft_sponsor_transfer_timeout: 15,
21 fungible_sponsor_transfer_timeout: 15,
22 refungible_sponsor_transfer_timeout: 15,
23 const_on_chain_schema_limit: 1024,
24 offchain_schema_limit: 1024,
25 variable_on_chain_schema_limit: 1024,
26 }));
27}
28
29fn default_nft_data() -> CreateNftData {
30 CreateNftData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] }
31}
32
33fn default_fungible_data () -> CreateFungibleData {
34 CreateFungibleData { value: 5 }
35}
36
37fn default_re_fungible_data () -> CreateReFungibleData {
38 CreateReFungibleData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1], pieces: 1023 }
39}
40
41fn create_test_collection_for_owner(mode: &CollectionMode, owner: u64, id: CollectionId) -> CollectionId {
42 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
15 assert_ok!(TemplateModule::create_collection(43 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
44 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
45
46 let origin1 = Origin::signed(owner);
47 assert_ok!(TemplateModule::create_collection(
16 origin1.clone(),48 origin1.clone(),
17 col_name1.clone(),49 col_name1.clone(),
18 col_desc1.clone(),50 col_desc1.clone(),
19 token_prefix1.clone(),51 token_prefix1.clone(),
20 mode52 mode.clone()
21 ));53 ));
22 assert_eq!(TemplateModule::collection(1).owner, 1);
2354
24 assert_ok!(TemplateModule::create_item(55 let saved_col_name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
56 let saved_description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
57 let saved_prefix: Vec<u8> = b"token_prefix1\0".to_vec();
58 assert_eq!(TemplateModule::collection(id).owner, owner);
59 assert_eq!(TemplateModule::collection(id).name, saved_col_name);
60 assert_eq!(TemplateModule::collection(id).mode, *mode);
61 assert_eq!(TemplateModule::collection(id).description, saved_description);
62 assert_eq!(TemplateModule::collection(id).token_prefix, saved_prefix);
63 id
64}
65
66fn create_test_collection(mode: &CollectionMode, id: CollectionId) -> CollectionId {
67 create_test_collection_for_owner(&mode, 1, id)
68}
69
70fn create_test_item(collection_id: CollectionId, data: &CreateItemData) {
71 let origin1 = Origin::signed(1);
72 assert_ok!(TemplateModule::create_item(
25 origin1.clone(),73 origin1.clone(),
74 collection_id,
26 1,75 1,
27 [1, 2, 3].to_vec(),76 data.clone()
28 1
29 ));77 ));
78
79}
80
30 assert_eq!(TemplateModule::nft_item_id(1, 1).data, [1, 2, 3].to_vec());81// Use cases tests region
82// #region
83
84#[test]
85fn set_version_schema() {
86 new_test_ext().execute_with(|| {
87 default_limits();
88 let origin1 = Origin::signed(1);
89 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
90
91 assert_ok!(TemplateModule::set_schema_version(origin1, collection_id, SchemaVersion::Unique));
92 assert_eq!(TemplateModule::collection(collection_id).schema_version, SchemaVersion::Unique);
31 });93 });
32}94}
3395
34#[test]96#[test]
35fn create_refungible_item() {97fn create_fungible_collection_fails_with_large_decimal_numbers() {
36 new_test_ext().execute_with(|| {98 new_test_ext().execute_with(|| {
99 default_limits();
100
37 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();101 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
38 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();102 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
39 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();103 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
40 let mode: CollectionMode = CollectionMode::ReFungible(2000, 3);
41104
42 let origin1 = Origin::signed(1);105 let origin1 = Origin::signed(1);
43 assert_ok!(TemplateModule::create_collection(106 assert_noop!(TemplateModule::create_collection(
44 origin1.clone(),107 origin1,
45 col_name1.clone(),108 col_name1,
46 col_desc1.clone(),109 col_desc1,
47 token_prefix1.clone(),110 token_prefix1,
48 mode111 CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1)
49 ));112 ), Error::<Test>::CollectionDecimalPointLimitExceeded);
50 assert_eq!(TemplateModule::collection(1).owner, 1);113 });
114}
51115
116#[test]
117fn create_nft_item() {
118 new_test_ext().execute_with(|| {
119 default_limits();
120 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
121
122 let data = default_nft_data();
123 create_test_item(collection_id, &data.clone().into());
124 assert_eq!(TemplateModule::nft_item_id(collection_id, 1).const_data, data.const_data);
125 assert_eq!(TemplateModule::nft_item_id(collection_id, 1).variable_data, data.variable_data);
126 });
127}
128
129// Use cases tests region
130// #region
131#[test]
132fn create_nft_multiple_items() {
133 new_test_ext().execute_with(|| {
134 default_limits();
135
136 create_test_collection(&CollectionMode::NFT, 1);
137
138 let origin1 = Origin::signed(1);
139
140 let items_data = vec![default_nft_data(), default_nft_data(), default_nft_data()];
141
52 assert_ok!(TemplateModule::create_item(142 assert_ok!(TemplateModule::create_multiple_items(
53 origin1.clone(),143 origin1.clone(),
54 1,144 1,
55 [1, 2, 3].to_vec(),145 1,
56 1146 items_data.clone().into_iter().map(|d| { d.into() }).collect()
57 ));147 ));
148 for (index, data) in items_data.iter().enumerate() {
149 assert_eq!(TemplateModule::nft_item_id(1, (index + 1) as TokenId).const_data.to_vec(), data.const_data);
150 assert_eq!(TemplateModule::nft_item_id(1, (index + 1) as TokenId).variable_data.to_vec(), data.variable_data);
151 }
152 });
153}
154
155#[test]
156fn create_refungible_item() {
157 new_test_ext().execute_with(|| {
158 default_limits();
159 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
160
161 let data = default_re_fungible_data();
162 create_test_item(collection_id, &data.clone().into());
58 assert_eq!(163 assert_eq!(
59 TemplateModule::refungible_item_id(1, 1).data,164 TemplateModule::refungible_item_id(collection_id, 1).const_data,
60 [1, 2, 3].to_vec()165 data.const_data
61 );166 );
62 assert_eq!(167 assert_eq!(
63 TemplateModule::refungible_item_id(1, 1).owner[0],168 TemplateModule::refungible_item_id(collection_id, 1).variable_data,
169 data.variable_data
170 );
171 assert_eq!(
172 TemplateModule::refungible_item_id(collection_id, 1).owner[0],
64 Ownership {173 Ownership {
65 owner: 1,174 owner: 1,
66 fraction: 1000175 fraction: 1023
67 }176 }
68 );177 );
69 });178 });
70}179}
71180
72#[test]181#[test]
73fn create_fungible_item() {182fn create_multiple_refungible_items() {
74 new_test_ext().execute_with(|| {183 new_test_ext().execute_with(|| {
75 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();184 default_limits();
76 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();185
77 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();186 create_test_collection(&CollectionMode::ReFungible, 1);
78 let mode: CollectionMode = CollectionMode::Fungible(3);
79187
80 let origin1 = Origin::signed(1);188 let origin1 = Origin::signed(1);
81 assert_ok!(TemplateModule::create_collection(
82 origin1.clone(),
83 col_name1.clone(),
84 col_desc1.clone(),
85 token_prefix1.clone(),
86 mode
87 ));
88 assert_eq!(TemplateModule::collection(1).owner, 1);
89189
90 assert_ok!(TemplateModule::create_item(190 let items_data = vec![default_re_fungible_data(), default_re_fungible_data(), default_re_fungible_data()];
191
192 assert_ok!(TemplateModule::create_multiple_items(
91 origin1.clone(),193 origin1.clone(),
92 1,194 1,
93 [].to_vec(),195 1,
94 1196 items_data.clone().into_iter().map(|d| { d.into() }).collect()
95 ));197 ));
96 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 1);198 for (index, data) in items_data.iter().enumerate() {
199
200 let item = TemplateModule::refungible_item_id(1, (index + 1) as TokenId);
97 assert_eq!(TemplateModule::balance_count(1, 1), 1000);201 assert_eq!(item.const_data.to_vec(), data.const_data);
202 assert_eq!(item.variable_data.to_vec(), data.variable_data);
98 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);203 assert_eq!(
204 item.owner[0],
205 Ownership {
206 owner: 1,
207 fraction: 1023
208 }
209 );
210 }
99 });211 });
100}212}
101213
102#[test]214#[test]
215fn create_fungible_item() {
216 new_test_ext().execute_with(|| {
217 default_limits();
218
219 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
220
221 let data = default_fungible_data();
222 create_test_item(collection_id, &data.into());
223
224 assert_eq!(TemplateModule::fungible_item_id(collection_id, 1).value, 5);
225 });
226}
227
228//#[test]
229// fn create_multiple_fungible_items() {
230// new_test_ext().execute_with(|| {
231// default_limits();
232
233// create_test_collection(&CollectionMode::Fungible(3), 1);
234
235// let origin1 = Origin::signed(1);
236
237// let items_data = vec![default_fungible_data(), default_fungible_data(), default_fungible_data()];
238
239// assert_ok!(TemplateModule::create_multiple_items(
240// origin1.clone(),
241// 1,
242// 1,
243// items_data.clone().into_iter().map(|d| { d.into() }).collect()
244// ));
245
246// for (index, _) in items_data.iter().enumerate() {
247// assert_eq!(TemplateModule::fungible_item_id(1, (index + 1) as TokenId).value, 5);
248// }
249// assert_eq!(TemplateModule::balance_count(1, 1), 3000);
250// assert_eq!(TemplateModule::address_tokens(1, 1), [1, 2, 3]);
251// });
252// }
253
254#[test]
103fn transfer_fungible_item() {255fn transfer_fungible_item() {
104 new_test_ext().execute_with(|| {256 new_test_ext().execute_with(|| {
105 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();257 default_limits();
106 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();258
107 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();259 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
108 let mode: CollectionMode = CollectionMode::Fungible(3);
109260
110 let origin1 = Origin::signed(1);261 let origin1 = Origin::signed(1);
111 let origin2 = Origin::signed(2);262 let origin2 = Origin::signed(2);
112 assert_ok!(TemplateModule::create_collection(
113 origin1.clone(),
114 col_name1.clone(),
115 col_desc1.clone(),
116 token_prefix1.clone(),
117 mode
118 ));
119 assert_eq!(TemplateModule::collection(1).owner, 1);
120263
121 assert_ok!(TemplateModule::create_item(264 let data = default_fungible_data();
122 origin1.clone(),
123 1,
124 [].to_vec(),
125 1
126 ));
127 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 1);265 create_test_item(collection_id, &data.into());
128 assert_eq!(TemplateModule::balance_count(1, 1), 1000);
129 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
130266
267 assert_eq!(TemplateModule::fungible_item_id(1, 1).value, 5);
268 assert_eq!(TemplateModule::balance_count(1, 1), 5);
269
131 // change owner scenario270 // change owner scenario
132 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1000));271 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 5));
133 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 2);272 assert_eq!(TemplateModule::fungible_item_id(1, 1).value, 0);
134 assert_eq!(TemplateModule::fungible_item_id(1, 1).value, 1000);
135 assert_eq!(TemplateModule::balance_count(1, 1), 0);273 assert_eq!(TemplateModule::balance_count(1, 1), 0);
136 assert_eq!(TemplateModule::balance_count(1, 2), 1000);274 assert_eq!(TemplateModule::balance_count(1, 2), 5);
137 assert_eq!(TemplateModule::address_tokens(1, 1), []);
138 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
139275
140 // split item scenario276 // split item scenario
141 assert_ok!(TemplateModule::transfer(origin2.clone(), 3, 1, 1, 500));277 assert_ok!(TemplateModule::transfer(origin2.clone(), 3, 1, 1, 3));
142 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 2);278 assert_eq!(TemplateModule::balance_count(1, 2), 2);
143 assert_eq!(TemplateModule::fungible_item_id(1, 2).owner, 3);
144 assert_eq!(TemplateModule::balance_count(1, 2), 500);279 assert_eq!(TemplateModule::balance_count(1, 3), 3);
145 assert_eq!(TemplateModule::balance_count(1, 3), 500);
146 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
147 assert_eq!(TemplateModule::address_tokens(1, 3), [2]);
148280
149 // split item and new owner has account scenario281 // split item and new owner has account scenario
150 assert_ok!(TemplateModule::transfer(origin2.clone(), 3, 1, 1, 200));282 assert_ok!(TemplateModule::transfer(origin2.clone(), 3, 1, 1, 1));
151 assert_eq!(TemplateModule::fungible_item_id(1, 1).value, 300);283 assert_eq!(TemplateModule::fungible_item_id(1, 2).value, 1);
152 assert_eq!(TemplateModule::fungible_item_id(1, 2).value, 700);284 assert_eq!(TemplateModule::fungible_item_id(1, 3).value, 4);
153 assert_eq!(TemplateModule::balance_count(1, 2), 300);285 assert_eq!(TemplateModule::balance_count(1, 2), 1);
154 assert_eq!(TemplateModule::balance_count(1, 3), 700);286 assert_eq!(TemplateModule::balance_count(1, 3), 4);
155 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
156 assert_eq!(TemplateModule::address_tokens(1, 3), [2]);
157 });287 });
158}288}
159289
160#[test]290#[test]
161fn transfer_refungible_item() {291fn transfer_refungible_item() {
162 new_test_ext().execute_with(|| {292 new_test_ext().execute_with(|| {
163 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();293 default_limits();
164 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();294
165 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();295 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
166 let mode: CollectionMode = CollectionMode::ReFungible(2000, 3);
167296
297 let data = default_re_fungible_data();
298 create_test_item(collection_id, &data.clone().into());
299
168 let origin1 = Origin::signed(1);300 let origin1 = Origin::signed(1);
169 let origin2 = Origin::signed(2);301 let origin2 = Origin::signed(2);
170 assert_ok!(TemplateModule::create_collection(
171 origin1.clone(),
172 col_name1.clone(),
173 col_desc1.clone(),
174 token_prefix1.clone(),
175 mode
176 ));
177 assert_eq!(TemplateModule::collection(1).owner, 1);
178
179 assert_ok!(TemplateModule::create_item(
180 origin1.clone(),
181 1,
182 [1, 2, 3].to_vec(),
183 1
184 ));
185 assert_eq!(302 assert_eq!(
186 TemplateModule::refungible_item_id(1, 1).data,303 TemplateModule::refungible_item_id(collection_id, 1).const_data,
187 [1, 2, 3].to_vec()304 data.const_data
188 );305 );
189 assert_eq!(306 assert_eq!(
190 TemplateModule::refungible_item_id(1, 1).owner[0],307 TemplateModule::refungible_item_id(collection_id, 1).variable_data,
308 data.variable_data
309 );
310 assert_eq!(
311 TemplateModule::refungible_item_id(collection_id, 1).owner[0],
191 Ownership {312 Ownership {
192 owner: 1,313 owner: 1,
193 fraction: 1000314 fraction: 1023
194 }315 }
195 );316 );
196 assert_eq!(TemplateModule::balance_count(1, 1), 1000);317 assert_eq!(TemplateModule::balance_count(1, 1), 1023);
197 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);318 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
198319
199 // change owner scenario320 // change owner scenario
200 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1000));321 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1023));
201 assert_eq!(322 assert_eq!(
202 TemplateModule::refungible_item_id(1, 1).owner[0],323 TemplateModule::refungible_item_id(1, 1).owner[0],
203 Ownership {324 Ownership {
204 owner: 2,325 owner: 2,
205 fraction: 1000326 fraction: 1023
206 }327 }
207 );328 );
208 assert_eq!(TemplateModule::balance_count(1, 1), 0);329 assert_eq!(TemplateModule::balance_count(1, 1), 0);
209 assert_eq!(TemplateModule::balance_count(1, 2), 1000);330 assert_eq!(TemplateModule::balance_count(1, 2), 1023);
210 assert_eq!(TemplateModule::address_tokens(1, 1), []);331 // assert_eq!(TemplateModule::address_tokens(1, 1), []);
211 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);332 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
212333
213 // split item scenario334 // split item scenario
216 TemplateModule::refungible_item_id(1, 1).owner[0],337 TemplateModule::refungible_item_id(1, 1).owner[0],
217 Ownership {338 Ownership {
218 owner: 2,339 owner: 2,
219 fraction: 500340 fraction: 523
220 }341 }
221 );342 );
222 assert_eq!(343 assert_eq!(
226 fraction: 500347 fraction: 500
227 }348 }
228 );349 );
229 assert_eq!(TemplateModule::balance_count(1, 2), 500);350 assert_eq!(TemplateModule::balance_count(1, 2), 523);
230 assert_eq!(TemplateModule::balance_count(1, 3), 500);351 assert_eq!(TemplateModule::balance_count(1, 3), 500);
231 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);352 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
232 assert_eq!(TemplateModule::address_tokens(1, 3), [1]);353 assert_eq!(TemplateModule::address_tokens(1, 3), [1]);
237 TemplateModule::refungible_item_id(1, 1).owner[0],358 TemplateModule::refungible_item_id(1, 1).owner[0],
238 Ownership {359 Ownership {
239 owner: 2,360 owner: 2,
240 fraction: 300361 fraction: 323
241 }362 }
242 );363 );
243 assert_eq!(364 assert_eq!(
247 fraction: 700368 fraction: 700
248 }369 }
249 );370 );
250 assert_eq!(TemplateModule::balance_count(1, 2), 300);371 assert_eq!(TemplateModule::balance_count(1, 2), 323);
251 assert_eq!(TemplateModule::balance_count(1, 3), 700);372 assert_eq!(TemplateModule::balance_count(1, 3), 700);
252 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);373 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
253 assert_eq!(TemplateModule::address_tokens(1, 3), [1]);374 assert_eq!(TemplateModule::address_tokens(1, 3), [1]);
257#[test]378#[test]
258fn transfer_nft_item() {379fn transfer_nft_item() {
259 new_test_ext().execute_with(|| {380 new_test_ext().execute_with(|| {
260 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();381 default_limits();
261 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();382
262 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();383 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
263 let mode: CollectionMode = CollectionMode::NFT(2000);
264384
265 let origin1 = Origin::signed(1);385 let data = default_nft_data();
266 assert_ok!(TemplateModule::create_collection(386 create_test_item(collection_id, &data.into());
267 origin1.clone(),
268 col_name1.clone(),
269 col_desc1.clone(),
270 token_prefix1.clone(),
271 mode
272 ));
273 assert_eq!(TemplateModule::collection(1).owner, 1);
274
275 assert_ok!(TemplateModule::create_item(
276 origin1.clone(),
277 1,
278 [1, 2, 3].to_vec(),
279 1
280 ));
281 assert_eq!(TemplateModule::nft_item_id(1, 1).data, [1, 2, 3].to_vec());
282 assert_eq!(TemplateModule::balance_count(1, 1), 1);387 assert_eq!(TemplateModule::balance_count(1, 1), 1);
283 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);388 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
284389
390 let origin1 = Origin::signed(1);
285 // default scenario391 // default scenario
286 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1000));392 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1000));
287 assert_eq!(TemplateModule::nft_item_id(1, 1).owner, 2);393 assert_eq!(TemplateModule::nft_item_id(1, 1).owner, 2);
288 assert_eq!(TemplateModule::balance_count(1, 1), 0);394 assert_eq!(TemplateModule::balance_count(1, 1), 0);
289 assert_eq!(TemplateModule::balance_count(1, 2), 1);395 assert_eq!(TemplateModule::balance_count(1, 2), 1);
290 assert_eq!(TemplateModule::address_tokens(1, 1), []);396 // assert_eq!(TemplateModule::address_tokens(1, 1), []);
291 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);397 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
292 });398 });
293}399}
294400
295#[test]401#[test]
296fn nft_approve_and_transfer_from() {402fn nft_approve_and_transfer_from() {
297 new_test_ext().execute_with(|| {403 new_test_ext().execute_with(|| {
298 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();404 default_limits();
299 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();405
300 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();406 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
301 let mode: CollectionMode = CollectionMode::NFT(2000);
302407
408 let data = default_nft_data();
409 create_test_item(collection_id, &data.into());
410
303 let origin1 = Origin::signed(1);411 let origin1 = Origin::signed(1);
304 let origin2 = Origin::signed(2);412 let origin2 = Origin::signed(2);
305 assert_ok!(TemplateModule::create_collection(
306 origin1.clone(),
307 col_name1.clone(),
308 col_desc1.clone(),
309 token_prefix1.clone(),
310 mode
311 ));
312 assert_eq!(TemplateModule::collection(1).owner, 1);
313413
314 assert_ok!(TemplateModule::create_item(414 assert_eq!(TemplateModule::balance_count(1, 1), 1);
415 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
416
417 // neg transfer
418 assert_noop!(TemplateModule::transfer_from(
315 origin1.clone(),419 origin2.clone(),
316 1,420 1,
317 [1, 2, 3].to_vec(),421 2,
422 1,
423 1,
424 1), Error::<Test>::NoPermission);
425
426 // do approve
427 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1, 5));
428 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 5);
429 assert_eq!(
430 TemplateModule::approved(1, (1, 1, 2)),
431 5
432 );
433
434 assert_ok!(TemplateModule::transfer_from(
435 origin2.clone(),
436 1,
437 3,
438 1,
439 1,
318 1440 1
319 ));441 ));
320 assert_eq!(TemplateModule::nft_item_id(1, 1).data, [1, 2, 3].to_vec());442 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 4);
443 });
444}
445
446#[test]
447fn nft_approve_and_transfer_from_white_list() {
448 new_test_ext().execute_with(|| {
449 default_limits();
450
451 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
452
453 let origin1 = Origin::signed(1);
454 let origin2 = Origin::signed(2);
455
456 let data = default_nft_data();
457 create_test_item(collection_id, &data.clone().into());
458
459 assert_eq!(TemplateModule::nft_item_id(1, 1).const_data, data.const_data);
321 assert_eq!(TemplateModule::balance_count(1, 1), 1);460 assert_eq!(TemplateModule::balance_count(1, 1), 1);
322 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);461 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
323462
324 assert_ok!(TemplateModule::set_mint_permission(origin1.clone(), 1, true));463 assert_ok!(TemplateModule::set_mint_permission(
464 origin1.clone(),
465 1,
466 true
467 ));
325 assert_ok!(TemplateModule::set_public_access_mode(origin1.clone(), 1, AccessMode::WhiteList));468 assert_ok!(TemplateModule::set_public_access_mode(
469 origin1.clone(),
470 1,
471 AccessMode::WhiteList
472 ));
326 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));473 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
327 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));474 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
328 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));475 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));
329476
330 // do approve477 // do approve
331 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));478 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1, 5));
332 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 1);479 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 5);
333 assert_ok!(TemplateModule::approve(origin1.clone(), 10, 1, 1));480 assert_ok!(TemplateModule::approve(origin1.clone(), 3, 1, 1, 5));
334 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 2);481 assert_eq!(TemplateModule::approved(1, (1, 1, 3)), 5);
335 assert_eq!(
336 TemplateModule::approved(1, (1, 1))[0],
337 ApprovePermissions {
338 approved: 2,
339 amount: 100000000
340 }
341 );
342482
343 assert_ok!(TemplateModule::transfer_from(483 assert_ok!(TemplateModule::transfer_from(
344 origin2.clone(),484 origin2.clone(),
348 1,488 1,
349 1489 1
350 ));490 ));
351 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 0);491 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 4);
352 });492 });
353}493}
354494
355#[test]495#[test]
356fn refungible_approve_and_transfer_from() {496fn refungible_approve_and_transfer_from() {
357 new_test_ext().execute_with(|| {497 new_test_ext().execute_with(|| {
358 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();498 default_limits();
359 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();499
360 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();500 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
361 let mode: CollectionMode = CollectionMode::ReFungible(2000, 3);501
362
363 let origin1 = Origin::signed(1);502 let origin1 = Origin::signed(1);
364 let origin2 = Origin::signed(2);503 let origin2 = Origin::signed(2);
504
505 let data = default_re_fungible_data();
506 create_test_item(collection_id, &data.into());
507
508 assert_eq!(TemplateModule::balance_count(1, 1), 1023);
509 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
510
365 assert_ok!(TemplateModule::create_collection(511 assert_ok!(TemplateModule::set_mint_permission(
366 origin1.clone(),512 origin1.clone(),
367 col_name1.clone(),513 1,
368 col_desc1.clone(),514 true
369 token_prefix1.clone(),
370 mode
371 ));515 ));
372 assert_eq!(TemplateModule::collection(1).owner, 1);516 assert_ok!(TemplateModule::set_public_access_mode(
373
374 assert_ok!(TemplateModule::create_item(
375 origin1.clone(),517 origin1.clone(),
376 1,518 1,
377 [1, 2, 3].to_vec(),519 AccessMode::WhiteList
378 1
379 ));520 ));
380 assert_eq!(
381 TemplateModule::refungible_item_id(1, 1).data,
382 [1, 2, 3].to_vec()
383 );
384 assert_eq!(
385 TemplateModule::refungible_item_id(1, 1).owner[0],
386 Ownership {
387 owner: 1,
388 fraction: 1000
389 }
390 );
391 assert_eq!(TemplateModule::balance_count(1, 1), 1000);
392 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
393
394 assert_ok!(TemplateModule::set_mint_permission(origin1.clone(), 1, true));
395 assert_ok!(TemplateModule::set_public_access_mode(origin1.clone(), 1, AccessMode::WhiteList));
396 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));521 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
397 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));522 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
398 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));523 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));
399524
400 // do approve525 // do approve
401 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));526 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1, 1023));
402 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 1);
403 assert_ok!(TemplateModule::approve(origin1.clone(), 10, 1, 1));527 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 1023);
404 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 2);
405 assert_eq!(
406 TemplateModule::approved(1, (1, 1))[0],
407 ApprovePermissions {
408 approved: 2,
409 amount: 100000000
410 }
411 );
412528
413 assert_ok!(TemplateModule::transfer_from(529 assert_ok!(TemplateModule::transfer_from(
414 origin2.clone(),530 origin2.clone(),
418 1,534 1,
419 100535 100
420 ));536 ));
421 assert_eq!(TemplateModule::balance_count(1, 1), 900);537 assert_eq!(TemplateModule::balance_count(1, 1), 923);
422 assert_eq!(TemplateModule::balance_count(1, 3), 100);538 assert_eq!(TemplateModule::balance_count(1, 3), 100);
423 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);539 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
424 assert_eq!(TemplateModule::address_tokens(1, 3), [1]);540 assert_eq!(TemplateModule::address_tokens(1, 3), [1]);
425541
426 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 1);
427 assert_eq!(542 assert_eq!(
428 TemplateModule::approved(1, (1, 1))[0],543 TemplateModule::approved(1, (1, 1, 2)),
429 ApprovePermissions {
430 approved: 10,
431 amount: 100000000
432 }544 923
433 );545 );
434 });546 });
435}547}
436548
437#[test]549#[test]
438fn fungible_approve_and_transfer_from() {550fn fungible_approve_and_transfer_from() {
439 new_test_ext().execute_with(|| {551 new_test_ext().execute_with(|| {
440 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();552 default_limits();
553
441 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();554 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
442 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();555
556 let data = default_fungible_data();
443 let mode: CollectionMode = CollectionMode::Fungible(3);557 create_test_item(collection_id, &data.into());
444558
445 let origin1 = Origin::signed(1);559 let origin1 = Origin::signed(1);
446 let origin2 = Origin::signed(2);560 let origin2 = Origin::signed(2);
561
562 assert_eq!(TemplateModule::balance_count(1, 1), 5);
563
447 assert_ok!(TemplateModule::create_collection(564 assert_ok!(TemplateModule::set_mint_permission(
448 origin1.clone(),565 origin1.clone(),
449 col_name1.clone(),566 1,
450 col_desc1.clone(),567 true
451 token_prefix1.clone(),
452 mode
453 ));568 ));
454 assert_eq!(TemplateModule::collection(1).owner, 1);569 assert_ok!(TemplateModule::set_public_access_mode(
455
456 assert_ok!(TemplateModule::create_item(
457 origin1.clone(),570 origin1.clone(),
458 1,571 1,
459 [].to_vec(),572 AccessMode::WhiteList
460 1
461 ));573 ));
462 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 1);
463 assert_eq!(TemplateModule::balance_count(1, 1), 1000);
464 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
465
466 assert_ok!(TemplateModule::set_mint_permission(origin1.clone(), 1, true));
467 assert_ok!(TemplateModule::set_public_access_mode(origin1.clone(), 1, AccessMode::WhiteList));
468 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));574 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
469 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));575 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
470 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));576 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));
471577
472 // do approve578 // do approve
473 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));579 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1, 5));
474 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 1);580 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 5);
475 assert_ok!(TemplateModule::approve(origin1.clone(), 10, 1, 1));581 assert_ok!(TemplateModule::approve(origin1.clone(), 3, 1, 1, 5));
476 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 2);582 assert_eq!(TemplateModule::approved(1, (1, 1, 3)), 5);
477 assert_eq!(583 assert_eq!(
478 TemplateModule::approved(1, (1, 1))[0],584 TemplateModule::approved(1, (1, 1, 2)),
479 ApprovePermissions {
480 approved: 2,
481 amount: 100000000
482 }585 5
483 );586 );
484587
485 assert_ok!(TemplateModule::transfer_from(588 assert_ok!(TemplateModule::transfer_from(
488 3,591 3,
489 1,592 1,
490 1,593 1,
491 100594 4
492 ));595 ));
493 assert_eq!(TemplateModule::balance_count(1, 1), 900);596 assert_eq!(TemplateModule::balance_count(1, 1), 1);
494 assert_eq!(TemplateModule::balance_count(1, 3), 100);
495 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);597 assert_eq!(TemplateModule::balance_count(1, 3), 4);
496 assert_eq!(TemplateModule::address_tokens(1, 3), [2]);
497598
498 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 1);599 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 1);
499 assert_eq!(
500 TemplateModule::approved(1, (1, 1))[0],
501 ApprovePermissions {
502 approved: 10,
503 amount: 100000000
504 }
505 );
506600
507 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));601 assert_noop!(TemplateModule::transfer_from(
508 assert_ok!(TemplateModule::transfer_from(
509 origin2.clone(),602 origin2.clone(),
510 1,603 1,
511 3,604 3,
512 1,605 1,
513 1,606 1,
514 900607 4
515 ));608 ), Error::<Test>::TokenValueNotEnough);
516 assert_eq!(TemplateModule::balance_count(1, 1), 0);
517 assert_eq!(TemplateModule::balance_count(1, 3), 1000);
518 assert_eq!(TemplateModule::address_tokens(1, 1), []);
519 assert_eq!(TemplateModule::address_tokens(1, 3), [2]);
520
521 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 0);
522 });609 });
523}610}
524611
525#[test]612#[test]
526fn change_collection_owner() {613fn change_collection_owner() {
527 new_test_ext().execute_with(|| {614 new_test_ext().execute_with(|| {
528 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();615 default_limits();
529 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();616
530 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();617 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
531 let mode: CollectionMode = CollectionMode::NFT(2000);618
532
533 let origin1 = Origin::signed(1);619 let origin1 = Origin::signed(1);
534 assert_ok!(TemplateModule::create_collection(
535 origin1.clone(),
536 col_name1.clone(),
537 col_desc1.clone(),
538 token_prefix1.clone(),
539 mode
540 ));
541 assert_ok!(TemplateModule::change_collection_owner(620 assert_ok!(TemplateModule::change_collection_owner(
542 origin1.clone(),621 origin1.clone(),
543 1,622 collection_id,
544 2623 2
545 ));624 ));
546 assert_eq!(TemplateModule::collection(1).owner, 2);625 assert_eq!(TemplateModule::collection(collection_id).owner, 2);
547 });626 });
548}627}
549628
550#[test]629#[test]
551fn destroy_collection() {630fn destroy_collection() {
552 new_test_ext().execute_with(|| {631 new_test_ext().execute_with(|| {
553 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();632 default_limits();
554 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();633
555 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();634 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
556 let mode: CollectionMode = CollectionMode::NFT(2000);635
557
558 let origin1 = Origin::signed(1);636 let origin1 = Origin::signed(1);
559 assert_ok!(TemplateModule::create_collection(637 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), collection_id));
560 origin1.clone(),
561 col_name1.clone(),
562 col_desc1.clone(),
563 token_prefix1.clone(),
564 mode
565 ));
566 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), 1));
567 });638 });
568}639}
569640
570#[test]641#[test]
571fn burn_nft_item() {642fn burn_nft_item() {
572 new_test_ext().execute_with(|| {643 new_test_ext().execute_with(|| {
573 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();644 default_limits();
574 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();645
575 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();646 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
576 let mode: CollectionMode = CollectionMode::NFT(2000);
577647
578 let origin1 = Origin::signed(1);648 let origin1 = Origin::signed(1);
579 assert_ok!(TemplateModule::create_collection(649 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
580 origin1.clone(),
581 col_name1.clone(),
582 col_desc1.clone(),
583 token_prefix1.clone(),
584 mode
585 ));
586 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));
587 assert_ok!(TemplateModule::create_item(650
588 origin1.clone(),651 let data = default_nft_data();
589 1,652 create_test_item(collection_id, &data.into());
590 [1, 2, 3].to_vec(),
591 1
592 ));
593653
594 assert_eq!(TemplateModule::nft_item_id(1, 1).data, [1, 2, 3].to_vec());
595
596 // check balance (collection with id = 1, user id = 1)654 // check balance (collection with id = 1, user id = 1)
597 assert_eq!(TemplateModule::balance_count(1, 1), 1);655 assert_eq!(TemplateModule::balance_count(1, 1), 1);
598656
599 // burn item657 // burn item
600 assert_ok!(TemplateModule::burn_item(origin1.clone(), 1, 1));658 assert_ok!(TemplateModule::burn_item(origin1.clone(), 1, 1, 5));
601 assert_noop!(659 assert_noop!(
602 TemplateModule::burn_item(origin1.clone(), 1, 1),660 TemplateModule::burn_item(origin1.clone(), 1, 1, 5),
603 "Item does not exists"661 Error::<Test>::TokenNotFound
604 );662 );
605663
606 assert_eq!(TemplateModule::balance_count(1, 1), 0);664 assert_eq!(TemplateModule::balance_count(1, 1), 0);
610#[test]668#[test]
611fn burn_fungible_item() {669fn burn_fungible_item() {
612 new_test_ext().execute_with(|| {670 new_test_ext().execute_with(|| {
613 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();671 default_limits();
672
673 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
614 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();674
675 let origin1 = Origin::signed(1);
676 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
615 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();677
678 let data = default_fungible_data();
616 let mode: CollectionMode = CollectionMode::Fungible(3);679 create_test_item(collection_id, &data.into());
617680
681 // check balance (collection with id = 1, user id = 1)
682 assert_eq!(TemplateModule::balance_count(1, 1), 5);
683
684 // burn item
685 assert_ok!(TemplateModule::burn_item(origin1.clone(), 1, 1, 5));
686 assert_noop!(
687 TemplateModule::burn_item(origin1.clone(), 1, 1, 5),
688 Error::<Test>::TokenNotFound
689 );
690
691 assert_eq!(TemplateModule::balance_count(1, 1), 0);
692 });
693}
694
695#[test]
696fn burn_refungible_item() {
697 new_test_ext().execute_with(|| {
698 default_limits();
699
700 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
618 let origin1 = Origin::signed(1);701 let origin1 = Origin::signed(1);
702
619 assert_ok!(TemplateModule::create_collection(703 assert_ok!(TemplateModule::set_mint_permission(
620 origin1.clone(),704 origin1.clone(),
621 col_name1.clone(),705 collection_id,
622 col_desc1.clone(),706 true
623 token_prefix1.clone(),
624 mode
625 ));707 ));
626 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));708 assert_ok!(TemplateModule::set_public_access_mode(
627 assert_ok!(TemplateModule::create_item(
628 origin1.clone(),709 origin1.clone(),
629 1,710 collection_id,
630 [].to_vec(),711 AccessMode::WhiteList
631 1
632 ));712 ));
713 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
633714
634 // check balance (collection with id = 1, user id = 1)715 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));
716
717 let data = default_re_fungible_data();
635 assert_eq!(TemplateModule::balance_count(1, 1), 1000);718 create_test_item(collection_id, &data.into());
636719
720 // check balance (collection with id = 1, user id = 2)
721 assert_eq!(TemplateModule::balance_count(1, 1), 1023);
722
637 // burn item723 // burn item
638 assert_ok!(TemplateModule::burn_item(origin1.clone(), 1, 1));724 assert_ok!(TemplateModule::burn_item(origin1.clone(), 1, 1, 1023));
639 assert_noop!(725 assert_noop!(
640 TemplateModule::burn_item(origin1.clone(), 1, 1),726 TemplateModule::burn_item(origin1.clone(), 1, 1, 1023),
641 "Item does not exists"727 Error::<Test>::TokenNotFound
642 );728 );
643729
644 assert_eq!(TemplateModule::balance_count(1, 1), 0);730 assert_eq!(TemplateModule::balance_count(1, 1), 0);
645 });731 });
646}732}
647733
648#[test]734#[test]
649fn burn_refungible_item() {735fn add_collection_admin() {
650 new_test_ext().execute_with(|| {736 new_test_ext().execute_with(|| {
651 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();737 default_limits();
738
652 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();739 let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);
653 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();740 create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);
741 create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);
654 let mode: CollectionMode = CollectionMode::ReFungible(200, 3);742
743 let origin1 = Origin::signed(1);
655744
745 // collection admin
746 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection1_id, 2));
747 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection1_id, 3));
748
749 assert_eq!(TemplateModule::admin_list_collection(collection1_id).contains(&2), true);
750 assert_eq!(TemplateModule::admin_list_collection(collection1_id).contains(&3), true);
751 });
752}
753
754#[test]
755fn remove_collection_admin() {
756 new_test_ext().execute_with(|| {
757 default_limits();
758
759 let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);
760 create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);
761 create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);
762
656 let origin1 = Origin::signed(1);763 let origin1 = Origin::signed(1);
657 let origin2 = Origin::signed(2);764 let origin2 = Origin::signed(2);
658 assert_ok!(TemplateModule::create_collection(765
766 // collection admin
767 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection1_id, 2));
768 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection1_id, 3));
769
770 assert_eq!(TemplateModule::admin_list_collection(1).contains(&2), true);
771 assert_eq!(TemplateModule::admin_list_collection(1).contains(&3), true);
772
773 // remove admin
774 assert_ok!(TemplateModule::remove_collection_admin(
775 origin2.clone(),
776 1,
777 3
778 ));
779 assert_eq!(TemplateModule::admin_list_collection(1).contains(&3), false);
780 });
781}
782
783#[test]
784fn balance_of() {
785 new_test_ext().execute_with(|| {
786 default_limits();
787
788 let nft_collection_id = create_test_collection(&CollectionMode::NFT, 1);
789 let fungible_collection_id = create_test_collection(&CollectionMode::Fungible(3), 2);
790 let re_fungible_collection_id = create_test_collection(&CollectionMode::ReFungible, 3);
791
792 // check balance before
793 assert_eq!(TemplateModule::balance_count(nft_collection_id, 1), 0);
794 assert_eq!(TemplateModule::balance_count(fungible_collection_id, 1), 0);
795 assert_eq!(TemplateModule::balance_count(re_fungible_collection_id, 1), 0);
796
797 let nft_data = default_nft_data();
798 create_test_item(nft_collection_id, &nft_data.into());
799
800 let fungible_data = default_fungible_data();
801 create_test_item(fungible_collection_id, &fungible_data.into());
802
803 let re_fungible_data = default_re_fungible_data();
804 create_test_item(re_fungible_collection_id, &re_fungible_data.into());
805
806 // check balance (collection with id = 1, user id = 1)
807 assert_eq!(TemplateModule::balance_count(nft_collection_id, 1), 1);
808 assert_eq!(TemplateModule::balance_count(fungible_collection_id, 1), 5);
809 assert_eq!(TemplateModule::balance_count(re_fungible_collection_id, 1), 1023);
810 assert_eq!(TemplateModule::nft_item_id(nft_collection_id, 1).owner, 1);
811 assert_eq!(TemplateModule::fungible_item_id(fungible_collection_id, 1).value, 5);
812 assert_eq!(TemplateModule::refungible_item_id(re_fungible_collection_id, 1).owner[0].owner, 1);
813 });
814}
815
816#[test]
817fn approve() {
818 new_test_ext().execute_with(|| {
819 default_limits();
820
821 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
822
823 let data = default_nft_data();
824 create_test_item(collection_id, &data.into());
825
826 let origin1 = Origin::signed(1);
827
828 // approve
829 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1, 1));
830 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 1);
831 });
832}
833
834#[test]
835fn transfer_from() {
836 new_test_ext().execute_with(|| {
837 default_limits();
838
839 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
840 let origin1 = Origin::signed(1);
841 let origin2 = Origin::signed(2);
842
843 let data = default_nft_data();
844 create_test_item(collection_id, &data.into());
845
846 // approve
847 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1, 1));
848 assert_eq!(TemplateModule::approved(1, (1, 1, 2)), 1);
849
850 assert_ok!(TemplateModule::set_mint_permission(
659 origin1.clone(),851 origin1.clone(),
660 col_name1.clone(),852 1,
661 col_desc1.clone(),853 true
662 token_prefix1.clone(),
663 mode
664 ));854 ));
665 855 assert_ok!(TemplateModule::set_public_access_mode(
666 assert_ok!(TemplateModule::set_mint_permission(origin1.clone(), 1, true));856 origin1.clone(),
667 assert_ok!(TemplateModule::set_public_access_mode(origin1.clone(), 1, AccessMode::WhiteList));857 1,
858 AccessMode::WhiteList
859 ));
668 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));860 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
861 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
862 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));
669863
670 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));864 assert_ok!(TemplateModule::transfer_from(
671 assert_ok!(TemplateModule::create_item(
672 origin2.clone(),865 origin2.clone(),
673 1,866 1,
674 [1, 2, 3].to_vec(),867 2,
868 1,
869 1,
675 1870 1
676 ));871 ));
677872
678 assert_eq!(873 // after transfer
679 TemplateModule::refungible_item_id(1, 1).data,874 assert_eq!(TemplateModule::balance_count(1, 1), 0);
875 assert_eq!(TemplateModule::balance_count(1, 2), 1);
876 });
877}
878
879// #endregion
880
881// Coverage tests region
882// #region
883
884#[test]
885fn owner_can_add_address_to_white_list() {
886 new_test_ext().execute_with(|| {
887 default_limits();
888
889 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
890
680 [1, 2, 3].to_vec()891 let origin1 = Origin::signed(1);
892 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
893 assert_eq!(TemplateModule::white_list(collection_id, 2), true);
894 });
895}
896
897#[test]
898fn admin_can_add_address_to_white_list() {
899 new_test_ext().execute_with(|| {
900 default_limits();
901
902 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
903 let origin1 = Origin::signed(1);
904 let origin2 = Origin::signed(2);
905
906 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
907 assert_ok!(TemplateModule::add_to_white_list(origin2.clone(), collection_id, 3));
908 assert_eq!(TemplateModule::white_list(collection_id, 3), true);
909 });
910}
911
912#[test]
913fn nonprivileged_user_cannot_add_address_to_white_list() {
914 new_test_ext().execute_with(|| {
915 default_limits();
916
917 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
918
919 let origin2 = Origin::signed(2);
920 assert_noop!(
921 TemplateModule::add_to_white_list(origin2.clone(), collection_id, 3),
922 Error::<Test>::NoPermission
681 );923 );
924 });
925}
682926
927#[test]
683 // check balance (collection with id = 1, user id = 2)928fn nobody_can_add_address_to_white_list_of_nonexisting_collection() {
929 new_test_ext().execute_with(|| {
684 assert_eq!(TemplateModule::balance_count(1, 1), 1000);930 default_limits();
685931
686 // burn item932 let origin1 = Origin::signed(1);
687 assert_ok!(TemplateModule::burn_item(origin1.clone(), 1, 1));933
688 assert_noop!(934 assert_noop!(
689 TemplateModule::burn_item(origin1.clone(), 1, 1),935 TemplateModule::add_to_white_list(origin1.clone(), 1, 2),
690 "Item does not exists"936 Error::<Test>::CollectionNotFound
691 );937 );
938 });
939}
692940
941#[test]
693 assert_eq!(TemplateModule::balance_count(1, 1), 0);942fn nobody_can_add_address_to_white_list_of_deleted_collection() {
943 new_test_ext().execute_with(|| {
944 default_limits();
945
946 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
947
948 let origin1 = Origin::signed(1);
949 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), collection_id));
950 assert_noop!(
951 TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2),
952 Error::<Test>::CollectionNotFound
953 );
694 });954 });
695}955}
696956
957// If address is already added to white list, nothing happens
697#[test]958#[test]
698fn add_collection_admin() {959fn address_is_already_added_to_white_list() {
699 new_test_ext().execute_with(|| {960 new_test_ext().execute_with(|| {
700 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();961 default_limits();
962
963 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
701 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();964 let origin1 = Origin::signed(1);
702 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();965
966 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
703 let mode: CollectionMode = CollectionMode::NFT(2000);967 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
968 assert_eq!(TemplateModule::white_list(collection_id, 2), true);
969 });
970}
704971
972#[test]
973fn owner_can_remove_address_from_white_list() {
974 new_test_ext().execute_with(|| {
975 default_limits();
976
977 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
978
705 let origin1 = Origin::signed(1);979 let origin1 = Origin::signed(1);
706 let origin2 = Origin::signed(2);980 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
707 let origin3 = Origin::signed(3);
708 assert_ok!(TemplateModule::create_collection(981 assert_ok!(TemplateModule::remove_from_white_list(
709 origin1.clone(),982 origin1.clone(),
710 col_name1.clone(),983 collection_id,
711 col_desc1.clone(),984 2
712 token_prefix1.clone(),
713 mode.clone()
714 ));985 ));
715 assert_ok!(TemplateModule::create_collection(986 assert_eq!(TemplateModule::white_list(collection_id, 2), false);
987 });
988}
989
990#[test]
991fn admin_can_remove_address_from_white_list() {
992 new_test_ext().execute_with(|| {
993 default_limits();
994
995 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
996 let origin1 = Origin::signed(1);
997 let origin2 = Origin::signed(2);
998
999 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
1000
1001 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 3));
1002 assert_ok!(TemplateModule::remove_from_white_list(
716 origin2.clone(),1003 origin2.clone(),
717 col_name1.clone(),1004 collection_id,
718 col_desc1.clone(),1005 3
719 token_prefix1.clone(),
720 mode.clone()
721 ));1006 ));
722 assert_ok!(TemplateModule::create_collection(1007 assert_eq!(TemplateModule::white_list(collection_id, 3), false);
723 origin3.clone(),
724 col_name1.clone(),
725 col_desc1.clone(),
726 token_prefix1.clone(),1008 });
727 mode.clone()1009}
728 ));
7291010
1011#[test]
730 assert_eq!(TemplateModule::collection(1).owner, 1);1012fn nonprivileged_user_cannot_remove_address_from_white_list() {
1013 new_test_ext().execute_with(|| {
1014 default_limits();
1015
1016 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
731 assert_eq!(TemplateModule::collection(2).owner, 2);1017 let origin1 = Origin::signed(1);
732 assert_eq!(TemplateModule::collection(3).owner, 3);1018 let origin2 = Origin::signed(2);
7331019
734 // collection admin1020 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
735 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));1021 assert_noop!(
1022 TemplateModule::remove_from_white_list(origin2.clone(), collection_id, 2),
1023 Error::<Test>::NoPermission
1024 );
736 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 3));1025 assert_eq!(TemplateModule::white_list(collection_id, 2), true);
1026 });
1027}
7371028
1029#[test]
738 assert_eq!(TemplateModule::admin_list_collection(1).contains(&2), true);1030fn nobody_can_remove_address_from_white_list_of_nonexisting_collection() {
1031 new_test_ext().execute_with(|| {
1032 default_limits();
1033 let origin1 = Origin::signed(1);
1034
739 assert_eq!(TemplateModule::admin_list_collection(1).contains(&3), true);1035 assert_noop!(
1036 TemplateModule::remove_from_white_list(origin1.clone(), 1, 2),
1037 Error::<Test>::CollectionNotFound
1038 );
740 });1039 });
741}1040}
7421041
743#[test]1042#[test]
744fn remove_collection_admin() {1043fn nobody_can_remove_address_from_white_list_of_deleted_collection() {
745 new_test_ext().execute_with(|| {1044 new_test_ext().execute_with(|| {
746 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1045 default_limits();
747 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1046
748 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1047 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
749 let mode: CollectionMode = CollectionMode::NFT(2000);
750
751 let origin1 = Origin::signed(1);1048 let origin1 = Origin::signed(1);
752 let origin2 = Origin::signed(2);1049 let origin2 = Origin::signed(2);
753 let origin3 = Origin::signed(3);
7541050
755 assert_ok!(TemplateModule::create_collection(1051 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1052 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), collection_id));
1053 assert_noop!(
1054 TemplateModule::remove_from_white_list(origin2.clone(), collection_id, 2),
1055 Error::<Test>::CollectionNotFound
1056 );
1057 assert_eq!(TemplateModule::white_list(collection_id, 2), false);
1058 });
1059}
1060
1061// If address is already removed from white list, nothing happens
1062#[test]
1063fn address_is_already_removed_from_white_list() {
1064 new_test_ext().execute_with(|| {
1065 default_limits();
1066
1067 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1068 let origin1 = Origin::signed(1);
1069
1070 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1071 assert_ok!(TemplateModule::remove_from_white_list(
756 origin1.clone(),1072 origin1.clone(),
757 col_name1.clone(),1073 collection_id,
758 col_desc1.clone(),1074 2
759 token_prefix1.clone(),
760 mode.clone()
761 ));1075 ));
762 assert_ok!(TemplateModule::create_collection(1076 assert_ok!(TemplateModule::remove_from_white_list(
763 origin2.clone(),1077 origin1.clone(),
764 col_name1.clone(),1078 collection_id,
765 col_desc1.clone(),1079 2
766 token_prefix1.clone(),
767 mode.clone()
768 ));1080 ));
769 assert_ok!(TemplateModule::create_collection(1081 assert_eq!(TemplateModule::white_list(collection_id, 2), false);
770 origin3.clone(),1082 });
1083}
1084
1085// If Public Access mode is set to WhiteList, tokens can’t be transferred from a non-whitelisted address with transfer or transferFrom (2 tests)
1086#[test]
1087fn white_list_test_1() {
1088 new_test_ext().execute_with(|| {
1089 default_limits();
771 col_name1.clone(),1090
1091 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1092
772 col_desc1.clone(),1093 let origin1 = Origin::signed(1);
1094
1095 let data = default_nft_data();
1096 create_test_item(collection_id, &data.into());
1097
773 token_prefix1.clone(),1098 assert_ok!(TemplateModule::set_public_access_mode(
1099 origin1.clone(),
774 mode.clone()1100 collection_id,
1101 AccessMode::WhiteList
775 ));1102 ));
1103 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
7761104
777 assert_eq!(TemplateModule::collection(1).owner, 1);1105 assert_noop!(
1106 TemplateModule::transfer(origin1.clone(), 3, 1, 1, 1),
778 assert_eq!(TemplateModule::collection(2).owner, 2);1107 Error::<Test>::AddresNotInWhiteList
779 assert_eq!(TemplateModule::collection(3).owner, 3);1108 );
1109 });
1110}
7801111
1112#[test]
781 // collection admin1113fn white_list_test_2() {
1114 new_test_ext().execute_with(|| {
1115 default_limits();
782 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));1116
1117 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
783 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 3));1118 let origin1 = Origin::signed(1);
1119
1120 let data = default_nft_data();
1121 create_test_item(collection_id, &data.into());
7841122
785 assert_eq!(TemplateModule::admin_list_collection(1).contains(&2), true);1123 assert_ok!(TemplateModule::set_public_access_mode(
1124 origin1.clone(),
1125 collection_id,
1126 AccessMode::WhiteList
1127 ));
786 assert_eq!(TemplateModule::admin_list_collection(1).contains(&3), true);1128 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
1129 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
7871130
788 // remove admin1131 // do approve
789 assert_ok!(TemplateModule::remove_collection_admin(1132 assert_ok!(TemplateModule::approve(origin1.clone(), 1, 1, 1, 1));
1133 assert_eq!(TemplateModule::approved(1, (1, 1, 1)), 1);
1134
1135 assert_ok!(TemplateModule::remove_from_white_list(
790 origin2.clone(),1136 origin1.clone(),
791 1,1137 1,
792 31138 1
793 ));1139 ));
1140
794 assert_eq!(TemplateModule::admin_list_collection(1).contains(&3), false);1141 assert_noop!(
1142 TemplateModule::transfer_from(origin1.clone(), 1, 3, 1, 1, 1),
1143 Error::<Test>::AddresNotInWhiteList
1144 );
795 });1145 });
796}1146}
7971147
1148// If Public Access mode is set to WhiteList, tokens can’t be transferred to a non-whitelisted address with transfer or transferFrom (2 tests)
798#[test]1149#[test]
799fn balance_of() {1150fn white_list_test_3() {
800 new_test_ext().execute_with(|| {1151 new_test_ext().execute_with(|| {
801 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1152 default_limits();
802 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1153
803 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1154 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
804 let nft_mode: CollectionMode = CollectionMode::NFT(2000);
805 let furg_mode: CollectionMode = CollectionMode::Fungible(3);
806 let refung_mode: CollectionMode = CollectionMode::ReFungible(2000, 3);
8071155
808 let origin1 = Origin::signed(1);1156 let origin1 = Origin::signed(1);
1157
1158 let data = default_nft_data();
1159 create_test_item(collection_id, &data.into());
8091160
810 assert_ok!(TemplateModule::create_collection(1161 assert_ok!(TemplateModule::set_public_access_mode(
811 origin1.clone(),1162 origin1.clone(),
812 col_name1.clone(),1163 collection_id,
813 col_desc1.clone(),1164 AccessMode::WhiteList
814 token_prefix1.clone(),
815 nft_mode.clone()
816 ));1165 ));
817 assert_ok!(TemplateModule::create_collection(1166 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
1167
1168 assert_noop!(
1169 TemplateModule::transfer(origin1.clone(), 3, 1, 1, 1),
1170 Error::<Test>::AddresNotInWhiteList
1171 );
1172 });
1173}
1174
1175#[test]
1176fn white_list_test_4() {
1177 new_test_ext().execute_with(|| {
1178 default_limits();
1179
1180 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1181
1182 let origin1 = Origin::signed(1);
1183
1184 let data = default_nft_data();
1185 create_test_item(collection_id, &data.into());
1186
1187 assert_ok!(TemplateModule::set_public_access_mode(
818 origin1.clone(),1188 origin1.clone(),
819 col_name1.clone(),1189 collection_id,
820 col_desc1.clone(),1190 AccessMode::WhiteList
821 token_prefix1.clone(),
822 furg_mode.clone()
823 ));1191 ));
824 assert_ok!(TemplateModule::create_collection(1192 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 1));
1193 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1194
1195 // do approve
1196 assert_ok!(TemplateModule::approve(origin1.clone(), 1, 1, 1, 1));
1197 assert_eq!(TemplateModule::approved(1, (1, 1, 1)), 1);
1198
1199 assert_ok!(TemplateModule::remove_from_white_list(
825 origin1.clone(),1200 origin1.clone(),
826 col_name1.clone(),1201 collection_id,
827 col_desc1.clone(),1202 2
828 token_prefix1.clone(),
829 refung_mode.clone()
830 ));1203 ));
8311204
832 assert_eq!(TemplateModule::collection(1).owner, 1);1205 assert_noop!(
1206 TemplateModule::transfer_from(origin1.clone(), 1, 3, 1, 1, 1),
833 assert_eq!(TemplateModule::collection(2).owner, 1);1207 Error::<Test>::AddresNotInWhiteList
834 assert_eq!(TemplateModule::collection(3).owner, 1);1208 );
1209 });
1210}
8351211
836 // check balance before1212// If Public Access mode is set to WhiteList, tokens can’t be destroyed by a non-whitelisted address (even if it owned them before enabling WhiteList mode)
1213#[test]
837 assert_eq!(TemplateModule::balance_count(1, 1), 0);1214fn white_list_test_5() {
838 assert_eq!(TemplateModule::balance_count(2, 1), 0);1215 new_test_ext().execute_with(|| {
1216 default_limits();
839 assert_eq!(TemplateModule::balance_count(3, 1), 0);1217
1218 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
8401219
841 // create item1220 let origin1 = Origin::signed(1);
1221
1222 let data = default_nft_data();
1223 create_test_item(collection_id, &data.into());
1224
842 assert_ok!(TemplateModule::create_item(1225 assert_ok!(TemplateModule::set_public_access_mode(
843 origin1.clone(),1226 origin1.clone(),
1227 collection_id,
1228 AccessMode::WhiteList
1229 ));
1230 assert_noop!(
1231 TemplateModule::burn_item(origin1.clone(), 1, 1, 5),
1232 Error::<Test>::AddresNotInWhiteList
1233 );
1234 });
1235}
1236
1237// If Public Access mode is set to WhiteList, token transfers can’t be Approved by a non-whitelisted address (see Approve method).
1238#[test]
1239fn white_list_test_6() {
1240 new_test_ext().execute_with(|| {
1241 default_limits();
1242
1243 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1244
1245 let origin1 = Origin::signed(1);
1246
1247 let data = default_nft_data();
1248 create_test_item(collection_id, &data.into());
1249
1250 assert_ok!(TemplateModule::set_public_access_mode(
1251 origin1.clone(),
1252 collection_id,
1253 AccessMode::WhiteList
1254 ));
1255
1256 // do approve
1257 assert_noop!(
1258 TemplateModule::approve(origin1.clone(), 1, 1, 1, 5),
1259 Error::<Test>::AddresNotInWhiteList
1260 );
1261 });
1262}
1263
1264// If Public Access mode is set to WhiteList, tokens can be transferred from a whitelisted address with transfer or transferFrom (2 tests) and
1265// tokens can be transferred from a whitelisted address with transfer or transferFrom (2 tests)
1266#[test]
1267fn white_list_test_7() {
1268 new_test_ext().execute_with(|| {
1269 default_limits();
1270
1271 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1272
1273 let data = default_nft_data();
1274 create_test_item(collection_id, &data.into());
1275
1276 let origin1 = Origin::signed(1);
1277
1278 assert_ok!(TemplateModule::set_public_access_mode(
1279 origin1.clone(),
1280 collection_id,
1281 AccessMode::WhiteList
1282 ));
1283 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 1));
1284 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1285
1286 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1));
1287 });
1288}
1289
1290#[test]
1291fn white_list_test_8() {
1292 new_test_ext().execute_with(|| {
1293 default_limits();
1294
1295 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1296
1297 let data = default_nft_data();
1298 create_test_item(collection_id, &data.into());
1299
1300 let origin1 = Origin::signed(1);
1301
1302 assert_ok!(TemplateModule::set_public_access_mode(
1303 origin1.clone(),
1304 collection_id,
1305 AccessMode::WhiteList
1306 ));
1307 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 1));
1308 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1309
1310 // do approve
1311 assert_ok!(TemplateModule::approve(origin1.clone(), 1, 1, 1, 5));
1312 assert_eq!(TemplateModule::approved(1, (1, 1, 1)), 5);
1313
1314 assert_ok!(TemplateModule::transfer_from(
1315 origin1.clone(),
844 1,1316 1,
845 [1, 1, 1].to_vec(),1317 2,
1318 1,
1319 1,
846 11320 1
847 ));1321 ));
1322 });
1323}
8481324
1325// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by owner.
1326#[test]
1327fn white_list_test_9() {
1328 new_test_ext().execute_with(|| {
1329 default_limits();
1330
1331 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1332 let origin1 = Origin::signed(1);
1333
1334 assert_ok!(TemplateModule::set_public_access_mode(
1335 origin1.clone(),
1336 collection_id,
1337 AccessMode::WhiteList
1338 ));
1339 assert_ok!(TemplateModule::set_mint_permission(
1340 origin1.clone(),
1341 collection_id,
1342 false
1343 ));
1344
1345 let data = default_nft_data();
1346 create_test_item(collection_id, &data.into());
1347 });
1348}
1349
1350// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by admin.
1351#[test]
1352fn white_list_test_10() {
1353 new_test_ext().execute_with(|| {
1354 default_limits();
1355
1356 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1357
1358 let origin1 = Origin::signed(1);
1359 let origin2 = Origin::signed(2);
1360
1361 assert_ok!(TemplateModule::set_public_access_mode(
1362 origin1.clone(),
1363 collection_id,
1364 AccessMode::WhiteList
1365 ));
1366 assert_ok!(TemplateModule::set_mint_permission(
1367 origin1.clone(),
1368 collection_id,
1369 false
1370 ));
1371
1372 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
1373
849 assert_ok!(TemplateModule::create_item(1374 assert_ok!(TemplateModule::create_item(
850 origin1.clone(),1375 origin2.clone(),
1376 collection_id,
851 2,1377 2,
852 [].to_vec(),1378 default_nft_data().into()
853 1
854 ));1379 ));
1380 });
1381}
8551382
856 assert_ok!(TemplateModule::create_item(1383// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens cannot be created by non-privileged and white listed address.
1384#[test]
1385fn white_list_test_11() {
1386 new_test_ext().execute_with(|| {
1387 default_limits();
1388
1389 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1390
1391 let origin1 = Origin::signed(1);
1392 let origin2 = Origin::signed(2);
1393
1394 assert_ok!(TemplateModule::set_public_access_mode(
857 origin1.clone(),1395 origin1.clone(),
858 3,1396 collection_id,
859 [1, 1, 1].to_vec(),1397 AccessMode::WhiteList
860 1
861 ));1398 ));
1399 assert_ok!(TemplateModule::set_mint_permission(
1400 origin1.clone(),
1401 collection_id,
1402 false
1403 ));
1404 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
8621405
863 // check balance (collection with id = 1, user id = 1)1406 assert_noop!(
864 assert_eq!(TemplateModule::balance_count(1, 1), 1);1407 TemplateModule::create_item(origin2.clone(), 1, 2, default_nft_data().into()),
865 assert_eq!(TemplateModule::balance_count(2, 1), 1000);
866 assert_eq!(TemplateModule::balance_count(3, 1), 1000);
867 assert_eq!(TemplateModule::nft_item_id(1, 1).owner, 1);1408 Error::<Test>::PublicMintingNotAllowed
868 assert_eq!(TemplateModule::fungible_item_id(2, 1).owner, 1);
869 assert_eq!(TemplateModule::refungible_item_id(3, 1).owner[0].owner, 1);1409 );
870 });1410 });
871}1411}
8721412
1413// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-white listed address.
873#[test]1414#[test]
874fn approve() {1415fn white_list_test_12() {
875 new_test_ext().execute_with(|| {1416 new_test_ext().execute_with(|| {
876 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1417 default_limits();
877 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1418
878 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1419 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
879 let nft_mode: CollectionMode = CollectionMode::NFT(2000);1420
880 let origin1 = Origin::signed(1);1421 let origin1 = Origin::signed(1);
1422 let origin2 = Origin::signed(2);
8811423
882 assert_ok!(TemplateModule::create_collection(1424 assert_ok!(TemplateModule::set_public_access_mode(
883 origin1.clone(),1425 origin1.clone(),
884 col_name1.clone(),1426 collection_id,
885 col_desc1.clone(),1427 AccessMode::WhiteList
886 token_prefix1.clone(),
887 nft_mode.clone()
888 ));1428 ));
1429 assert_ok!(TemplateModule::set_mint_permission(
1430 origin1.clone(),
1431 collection_id,
1432 false
1433 ));
8891434
890 assert_eq!(TemplateModule::collection(1).owner, 1);1435 assert_noop!(
1436 TemplateModule::create_item(origin2.clone(), 1, 2, default_nft_data().into()),
1437 Error::<Test>::PublicMintingNotAllowed
1438 );
1439 });
1440}
8911441
892 // create item1442// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by owner.
1443#[test]
1444fn white_list_test_13() {
1445 new_test_ext().execute_with(|| {
1446 default_limits();
1447
1448 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1449
1450 let origin1 = Origin::signed(1);
1451
1452 assert_ok!(TemplateModule::set_public_access_mode(
1453 origin1.clone(),
1454 collection_id,
1455 AccessMode::WhiteList
1456 ));
1457 assert_ok!(TemplateModule::set_mint_permission(
1458 origin1.clone(),
1459 collection_id,
1460 true
1461 ));
1462
1463 let data = default_nft_data();
1464 create_test_item(collection_id, &data.into());
1465 });
1466}
1467
1468// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by admin.
1469#[test]
1470fn white_list_test_14() {
1471 new_test_ext().execute_with(|| {
1472 default_limits();
1473
1474 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1475
1476 let origin1 = Origin::signed(1);
1477 let origin2 = Origin::signed(2);
1478
1479 assert_ok!(TemplateModule::set_public_access_mode(
1480 origin1.clone(),
1481 collection_id,
1482 AccessMode::WhiteList
1483 ));
1484 assert_ok!(TemplateModule::set_mint_permission(
1485 origin1.clone(),
1486 collection_id,
1487 true
1488 ));
1489
1490 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
1491
893 assert_ok!(TemplateModule::create_item(1492 assert_ok!(TemplateModule::create_item(
1493 origin2.clone(),
1494 1,
1495 2,
1496 default_nft_data().into()
1497 ));
1498 });
1499}
1500
1501// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-white listed address.
1502#[test]
1503fn white_list_test_15() {
1504 new_test_ext().execute_with(|| {
1505 default_limits();
1506
1507 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1508
1509 let origin1 = Origin::signed(1);
1510 let origin2 = Origin::signed(2);
1511
1512 assert_ok!(TemplateModule::set_public_access_mode(
894 origin1.clone(),1513 origin1.clone(),
1514 collection_id,
1515 AccessMode::WhiteList
1516 ));
1517 assert_ok!(TemplateModule::set_mint_permission(
1518 origin1.clone(),
1519 collection_id,
1520 true
1521 ));
1522
1523 assert_noop!(
1524 TemplateModule::create_item(origin2.clone(), 1, 2, default_nft_data().into()),
1525 Error::<Test>::AddresNotInWhiteList
1526 );
1527 });
1528}
1529
1530// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by non-privileged and white listed address.
1531#[test]
1532fn white_list_test_16() {
1533 new_test_ext().execute_with(|| {
1534 default_limits();
1535
1536 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1537
1538 let origin1 = Origin::signed(1);
1539 let origin2 = Origin::signed(2);
1540
1541 assert_ok!(TemplateModule::set_public_access_mode(
1542 origin1.clone(),
1543 collection_id,
1544 AccessMode::WhiteList
1545 ));
1546 assert_ok!(TemplateModule::set_mint_permission(
1547 origin1.clone(),
1548 collection_id,
1549 true
1550 ));
1551 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1552
1553 assert_ok!(TemplateModule::create_item(
1554 origin2.clone(),
895 1,1555 1,
896 [1, 1, 1].to_vec(),1556 2,
897 11557 default_nft_data().into()
898 ));1558 ));
1559 });
1560}
8991561
900 // approve1562// Total number of collections. Positive test
1563#[test]
1564fn total_number_collections_bound() {
1565 new_test_ext().execute_with(|| {
901 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));1566 default_limits();
1567
902 assert_eq!(TemplateModule::approved(1, (1, 1))[0].approved, 2);1568 create_test_collection(&CollectionMode::NFT, 1);
903 });1569 });
904}1570}
9051571
1572// Total number of collections. Negotive test
906#[test]1573#[test]
907fn transfer_from() {1574fn total_number_collections_bound_neg() {
908 new_test_ext().execute_with(|| {1575 new_test_ext().execute_with(|| {
1576 default_limits();
1577
1578 let origin1 = Origin::signed(1);
1579
1580 for i in 0..default_collection_numbers_limit() {
1581 create_test_collection(&CollectionMode::NFT, i + 1);
1582 }
1583
909 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1584 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
910 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1585 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
911 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1586 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
912 let mode: CollectionMode = CollectionMode::NFT(2000);
913 let origin1 = Origin::signed(1);
914 let origin2 = Origin::signed(2);
9151587
916 assert_ok!(TemplateModule::create_collection(1588 // 11-th collection in chain. Expects error
1589 assert_noop!(TemplateModule::create_collection(
917 origin1.clone(),1590 origin1.clone(),
918 col_name1.clone(),1591 col_name1.clone(),
919 col_desc1.clone(),1592 col_desc1.clone(),
920 token_prefix1.clone(),1593 token_prefix1.clone(),
921 mode1594 CollectionMode::NFT
922 ));1595 ), Error::<Test>::TotalCollectionsLimitExceeded);
1596 });
1597}
9231598
924 assert_eq!(TemplateModule::collection(1).owner, 1);1599// Owned tokens by a single address. Positive test
1600#[test]
1601fn owned_tokens_bound() {
1602 new_test_ext().execute_with(|| {
1603 default_limits();
1604
1605 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
9251606
926 // create item1607 let data = default_nft_data();
1608 create_test_item(collection_id, &data.clone().into());
1609 create_test_item(collection_id, &data.into());
1610 });
1611}
1612
1613// Owned tokens by a single address. Negotive test
1614#[test]
927 assert_ok!(TemplateModule::create_item(1615fn owned_tokens_bound_neg() {
1616 new_test_ext().execute_with(|| {
1617 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1618 collection_numbers_limit: 10,
1619 account_token_ownership_limit: 1,
1620 collections_admins_limit: 5,
1621 custom_data_limit: 2048,
1622 nft_sponsor_transfer_timeout: 15,
1623 fungible_sponsor_transfer_timeout: 15,
1624 refungible_sponsor_transfer_timeout: 15,
1625 const_on_chain_schema_limit: 1024,
1626 offchain_schema_limit: 1024,
1627 variable_on_chain_schema_limit: 1024,
1628 }));
1629
1630 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1631
1632 let origin1 = Origin::signed(1);
1633 let data = default_nft_data();
1634 create_test_item(collection_id, &data.clone().into());
1635
1636 assert_noop!(TemplateModule::create_item(
928 origin1.clone(),1637 origin1.clone(),
929 1,1638 1,
930 [1, 1, 1].to_vec(),1639 1,
931 11640 data.into()
932 ));1641 ), Error::<Test>::AddressOwnershipLimitExceeded);
1642 });
1643}
9331644
934 // approve1645// Number of collection admins. Positive test
1646#[test]
1647fn collection_admins_bound() {
1648 new_test_ext().execute_with(|| {
935 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));1649 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1650 collection_numbers_limit: 10,
1651 account_token_ownership_limit: 10,
1652 collections_admins_limit: 2,
1653 custom_data_limit: 2048,
1654 nft_sponsor_transfer_timeout: 15,
936 assert_eq!(TemplateModule::approved(1, (1, 1))[0].approved, 2);1655 fungible_sponsor_transfer_timeout: 15,
1656 refungible_sponsor_transfer_timeout: 15,
1657 const_on_chain_schema_limit: 1024,
1658 offchain_schema_limit: 1024,
1659 variable_on_chain_schema_limit: 1024,
1660 }));
1661
1662 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
9371663
938 assert_ok!(TemplateModule::set_mint_permission(origin1.clone(), 1, true));1664 let origin1 = Origin::signed(1);
939 assert_ok!(TemplateModule::set_public_access_mode(origin1.clone(), 1, AccessMode::WhiteList));1665
940 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));1666 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
941 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1667 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 3));
942 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));1668 });
1669}
9431670
944 assert_ok!(TemplateModule::transfer_from(1671// Number of collection admins. Negotive test
1672#[test]
1673fn collection_admins_bound_neg() {
1674 new_test_ext().execute_with(|| {
1675 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
945 origin2.clone(),1676 collection_numbers_limit: 10,
1677 account_token_ownership_limit: 1,
1678 collections_admins_limit: 1,
1679 custom_data_limit: 2048,
1680 nft_sponsor_transfer_timeout: 15,
1681 fungible_sponsor_transfer_timeout: 15,
1682 refungible_sponsor_transfer_timeout: 15,
1683 const_on_chain_schema_limit: 1024,
1684 offchain_schema_limit: 1024,
1685 variable_on_chain_schema_limit: 1024,
1686 }));
1687
1688 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1689
1690 let origin1 = Origin::signed(1);
1691
1692 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
1693 assert_noop!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 3), Error::<Test>::CollectionAdminsLimitExceeded);
1694 });
1695}
1696
1697// NFT custom data size. Negative test const_data.
1698#[test]
1699fn custom_data_size_nft_const_data_bound_neg() {
1700 new_test_ext().execute_with(|| {
1701 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1702 collection_numbers_limit: 10,
1703 account_token_ownership_limit: 10,
1704 collections_admins_limit: 5,
1705 custom_data_limit: 2,
1706 nft_sponsor_transfer_timeout: 15,
1707 fungible_sponsor_transfer_timeout: 15,
1708 refungible_sponsor_transfer_timeout: 15,
1709 const_on_chain_schema_limit: 1024,
1710 offchain_schema_limit: 1024,
1711 variable_on_chain_schema_limit: 1024,
1712 }));
1713
1714 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1715
1716 let origin1 = Origin::signed(1);
1717 let too_big_const_data = CreateItemData::NFT(CreateNftData{
1718 const_data: vec![1, 2, 3, 4],
1719 variable_data: vec![]
1720 });
1721
1722 assert_noop!(TemplateModule::create_item(
1723 origin1.clone(),
1724 collection_id,
946 1,1725 1,
947 2,1726 too_big_const_data
1727 ), Error::<Test>::TokenConstDataLimitExceeded);
1728 });
1729}
1730
1731// NFT custom data size. Negative test variable_data.
1732#[test]
1733fn custom_data_size_nft_variable_data_bound_neg() {
1734 new_test_ext().execute_with(|| {
1735 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1736 collection_numbers_limit: 10,
1737 account_token_ownership_limit: 10,
1738 collections_admins_limit: 5,
1739 custom_data_limit: 2,
1740 nft_sponsor_transfer_timeout: 15,
1741 fungible_sponsor_transfer_timeout: 15,
1742 refungible_sponsor_transfer_timeout: 15,
1743 const_on_chain_schema_limit: 1024,
1744 offchain_schema_limit: 1024,
1745 variable_on_chain_schema_limit: 1024,
1746 }));
1747
1748 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1749
1750 let origin1 = Origin::signed(1);
1751 let too_big_const_data = CreateItemData::NFT(CreateNftData{
1752 const_data: vec![],
1753 variable_data: vec![1, 2, 3, 4]
1754 });
1755
1756 assert_noop!(TemplateModule::create_item(
1757 origin1.clone(),
1758 collection_id,
948 1,1759 1,
1760 too_big_const_data
1761 ), Error::<Test>::TokenVariableDataLimitExceeded);
1762 });
1763}
1764
1765// Re fungible custom data size. Negative test const_data.
1766#[test]
1767fn custom_data_size_re_fungible_const_data_bound_neg() {
1768 new_test_ext().execute_with(|| {
1769 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1770 collection_numbers_limit: 10,
1771 account_token_ownership_limit: 10,
1772 collections_admins_limit: 5,
1773 custom_data_limit: 2,
1774 nft_sponsor_transfer_timeout: 15,
1775 fungible_sponsor_transfer_timeout: 15,
1776 refungible_sponsor_transfer_timeout: 15,
1777 const_on_chain_schema_limit: 1024,
1778 offchain_schema_limit: 1024,
1779 variable_on_chain_schema_limit: 1024,
1780 }));
1781
1782 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1783
1784 let origin1 = Origin::signed(1);
1785 let too_big_const_data = CreateItemData::NFT(CreateNftData{
1786 const_data: vec![1, 2, 3, 4],
1787 variable_data: vec![]
1788 });
1789
1790 assert_noop!(TemplateModule::create_item(
1791 origin1.clone(),
1792 collection_id,
949 1,1793 1,
950 11794 too_big_const_data
951 ));1795 ), Error::<Test>::TokenConstDataLimitExceeded);
1796 });
1797}
9521798
953 // after transfer1799// Re fungible custom data size. Negative test variable_data.
954 assert_eq!(TemplateModule::balance_count(1, 1), 0);1800#[test]
955 assert_eq!(TemplateModule::balance_count(1, 2), 1);1801fn custom_data_size_re_fungible_variable_data_bound_neg() {
1802 new_test_ext().execute_with(|| {
1803 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1804 collection_numbers_limit: 10,
1805 account_token_ownership_limit: 10,
1806 collections_admins_limit: 5,
1807 custom_data_limit: 2,
1808 nft_sponsor_transfer_timeout: 15,
1809 fungible_sponsor_transfer_timeout: 15,
1810 refungible_sponsor_transfer_timeout: 15,
1811 const_on_chain_schema_limit: 1024,
1812 offchain_schema_limit: 1024,
1813 variable_on_chain_schema_limit: 1024,
1814 }));
1815
1816 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1817
1818 let origin1 = Origin::signed(1);
1819 let too_big_const_data = CreateItemData::NFT(CreateNftData{
1820 const_data: vec![],
1821 variable_data: vec![1, 2, 3, 4]
1822 });
1823
1824 assert_noop!(TemplateModule::create_item(
1825 origin1.clone(),
1826 collection_id,
1827 1,
1828 too_big_const_data
1829 ), Error::<Test>::TokenVariableDataLimitExceeded);
1830 });
1831}
1832// #endregion
1833
1834#[test]
1835fn set_const_on_chain_schema() {
1836 new_test_ext().execute_with(|| {
1837 default_limits();
1838
1839 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1840
1841 let origin1 = Origin::signed(1);
1842 assert_ok!(TemplateModule::set_const_on_chain_schema(origin1, collection_id, b"test const on chain schema".to_vec()));
1843
1844 assert_eq!(TemplateModule::collection(collection_id).const_on_chain_schema, b"test const on chain schema".to_vec());
1845 assert_eq!(TemplateModule::collection(collection_id).variable_on_chain_schema, b"".to_vec());
1846 });
1847}
1848
1849#[test]
1850fn set_variable_on_chain_schema() {
1851 new_test_ext().execute_with(|| {
1852 default_limits();
1853
1854 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1855
1856 let origin1 = Origin::signed(1);
1857 assert_ok!(TemplateModule::set_variable_on_chain_schema(origin1, collection_id, b"test variable on chain schema".to_vec()));
1858
1859 assert_eq!(TemplateModule::collection(collection_id).const_on_chain_schema, b"".to_vec());
1860 assert_eq!(TemplateModule::collection(collection_id).variable_on_chain_schema, b"test variable on chain schema".to_vec());
1861 });
1862}
1863
1864#[test]
1865fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {
1866 new_test_ext().execute_with(|| {
1867 default_limits();
1868
1869 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1870
1871 let origin1 = Origin::signed(1);
1872
1873 let data = default_nft_data();
1874 create_test_item(1, &data.into());
1875
1876 let variable_data = b"test set_variable_meta_data method.".to_vec();
1877 assert_ok!(TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data.clone()));
1878
1879 assert_eq!(TemplateModule::nft_item_id(collection_id, 1).variable_data, variable_data);
1880 });
1881}
1882
1883#[test]
1884fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {
1885 new_test_ext().execute_with(|| {
1886 default_limits();
1887
1888 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
1889
1890 let origin1 = Origin::signed(1);
1891
1892 let data = default_re_fungible_data();
1893 create_test_item(1, &data.into());
1894
1895 let variable_data = b"test set_variable_meta_data method.".to_vec();
1896 assert_ok!(TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data.clone()));
1897
1898 assert_eq!(TemplateModule::refungible_item_id(collection_id, 1).variable_data, variable_data);
1899 });
1900}
1901
1902
1903#[test]
1904fn set_variable_meta_data_on_fungible_token_fails() {
1905 new_test_ext().execute_with(|| {
1906 default_limits();
1907
1908 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
1909
1910 let origin1 = Origin::signed(1);
1911
1912 let data = default_fungible_data();
1913 create_test_item(1, &data.into());
1914
1915 let variable_data = b"test set_variable_meta_data method.".to_vec();
1916 assert_noop!(TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data.clone()), Error::<Test>::CantStoreMetadataInFungibleTokens);
1917 });
1918}
1919
1920#[test]
1921fn set_variable_meta_data_on_nft_token_fails_for_big_data() {
1922 new_test_ext().execute_with(|| {
1923 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1924 collection_numbers_limit: default_collection_numbers_limit(),
1925 account_token_ownership_limit: 10,
1926 collections_admins_limit: 5,
1927 custom_data_limit: 10,
1928 nft_sponsor_transfer_timeout: 15,
1929 fungible_sponsor_transfer_timeout: 15,
1930 refungible_sponsor_transfer_timeout: 15,
1931 const_on_chain_schema_limit: 1024,
1932 offchain_schema_limit: 1024,
1933 variable_on_chain_schema_limit: 1024,
1934 }));
1935
1936 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1937
1938 let origin1 = Origin::signed(1);
1939
1940 let data = default_nft_data();
1941 create_test_item(1, &data.into());
1942
1943 let variable_data = b"test set_variable_meta_data method, bigger than limits.".to_vec();
1944 assert_noop!(TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data), Error::<Test>::TokenVariableDataLimitExceeded);
1945 });
1946}
1947
1948#[test]
1949fn set_variable_meta_data_on_re_fungible_token_fails_for_big_data() {
1950 new_test_ext().execute_with(|| {
1951 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1952 collection_numbers_limit: default_collection_numbers_limit(),
1953 account_token_ownership_limit: 10,
1954 collections_admins_limit: 5,
1955 custom_data_limit: 10,
1956 nft_sponsor_transfer_timeout: 15,
1957 fungible_sponsor_transfer_timeout: 15,
1958 refungible_sponsor_transfer_timeout: 15,
1959 const_on_chain_schema_limit: 1024,
1960 offchain_schema_limit: 1024,
1961 variable_on_chain_schema_limit: 1024,
1962 }));
1963
1964
1965 let collection_id = create_test_collection(&CollectionMode::ReFungible, 1);
1966
1967 let origin1 = Origin::signed(1);
1968
1969 let data = default_re_fungible_data();
1970 create_test_item(1, &data.into());
1971
1972 let variable_data = b"test set_variable_meta_data method, bigger than limits.".to_vec();
1973 assert_noop!(TemplateModule::set_variable_meta_data(origin1, collection_id, 1, variable_data), Error::<Test>::TokenVariableDataLimitExceeded);
956 });1974 });
957}1975}
9581976
addedpallets/nft/src/types.rsdiffbeforeafterboth

no changes

addedpurge-running-node.shdiffbeforeafterboth

no changes

modifiedrun-testnet.shdiffbeforeafterboth
49 --rpc-port $RPCPORT \49 --rpc-port $RPCPORT \
50 --name $NODE \50 --name $NODE \
51 --ws-external \51 --ws-external \
52 --ws-max-connections 10000 \
52 --rpc-cors all \53 --rpc-cors all \
53 -lruntime \54 -lruntime \
54 $BOOTNODES;55 $BOOTNODES;
modifiedruntime/Cargo.tomldiffbeforeafterboth
1[dependencies.aura]
2default-features = false
3git = 'https://github.com/usetech-llc/substrate.git'
4package = 'pallet-aura'
5branch = 'rc4_ext_dispatch_reenabled'
6version = '2.0.0-rc4'
7
8[dependencies.balances]
9default-features = false
10git = 'https://github.com/usetech-llc/substrate.git'
11package = 'pallet-balances'
12branch = 'rc4_ext_dispatch_reenabled'
13version = '2.0.0-rc4'
14
15[dependencies.codec]
16default-features = false
17features = ['derive']
18package = 'parity-scale-codec'
19version = '1.3.0'
20
21[dependencies.contracts]
22git = 'https://github.com/usetech-llc/substrate.git'
23default-features = false
24package = 'pallet-contracts'
25branch = 'rc4_ext_dispatch_reenabled'
26version = '2.0.0-rc4'
27
28[dependencies.contracts-primitives]
29git = 'https://github.com/usetech-llc/substrate.git'
30default-features = false
31package = 'pallet-contracts-primitives'
32branch = 'rc4_ext_dispatch_reenabled'
33version = '2.0.0-rc4'
34
35[dependencies.contracts-rpc-runtime-api]
36git = 'https://github.com/usetech-llc/substrate.git'
37default-features = false
38package = 'pallet-contracts-rpc-runtime-api'
39version = '0.8.0-rc4'
40branch = 'rc4_ext_dispatch_reenabled'
41
42[dependencies.frame-executive]
43default-features = false
44git = 'https://github.com/usetech-llc/substrate.git'
45branch = 'rc4_ext_dispatch_reenabled'
46version = '2.0.0-rc4'
47
48[dependencies.frame-support]
49default-features = false
50git = 'https://github.com/usetech-llc/substrate.git'
51branch = 'rc4_ext_dispatch_reenabled'
52version = '2.0.0-rc4'
53
54[dependencies.grandpa]
55default-features = false
56git = 'https://github.com/usetech-llc/substrate.git'
57package = 'pallet-grandpa'
58branch = 'rc4_ext_dispatch_reenabled'
59version = '2.0.0-rc4'
60
61[dependencies.randomness-collective-flip]
62default-features = false
63git = 'https://github.com/usetech-llc/substrate.git'
64package = 'pallet-randomness-collective-flip'
65branch = 'rc4_ext_dispatch_reenabled'
66version = '2.0.0-rc4'
67
68[dependencies.serde]
69features = ['derive']
70optional = true
71version = '1.0.101'
72
73[dependencies.sp-api]
74default-features = false
75git = 'https://github.com/usetech-llc/substrate.git'
76branch = 'rc4_ext_dispatch_reenabled'
77version = '2.0.0-rc4'
78
79[dependencies.sp-block-builder]
80default-features = false
81git = 'https://github.com/usetech-llc/substrate.git'
82branch = 'rc4_ext_dispatch_reenabled'
83version = '2.0.0-rc4'
84
85[dependencies.sp-consensus-aura]
86default-features = false
87git = 'https://github.com/usetech-llc/substrate.git'
88branch = 'rc4_ext_dispatch_reenabled'
89version = '0.8.0-rc4'
90
91[dependencies.sp-core]
92default-features = false
93git = 'https://github.com/usetech-llc/substrate.git'
94branch = 'rc4_ext_dispatch_reenabled'
95version = '2.0.0-rc4'
96
97[dependencies.sp-inherents]
98default-features = false
99git = 'https://github.com/usetech-llc/substrate.git'
100branch = 'rc4_ext_dispatch_reenabled'
101version = '2.0.0-rc4'
102
103[dependencies.sp-io]
104default-features = false
105git = 'https://github.com/usetech-llc/substrate.git'
106branch = 'rc4_ext_dispatch_reenabled'
107version = '2.0.0-rc4'
108
109[dependencies.sp-offchain]
110default-features = false
111git = 'https://github.com/usetech-llc/substrate.git'
112branch = 'rc4_ext_dispatch_reenabled'
113version = '2.0.0-rc4'
114
115[dependencies.sp-runtime]
116default-features = false
117git = 'https://github.com/usetech-llc/substrate.git'
118branch = 'rc4_ext_dispatch_reenabled'
119version = '2.0.0-rc4'
120
121[dependencies.sp-session]
122default-features = false
123git = 'https://github.com/usetech-llc/substrate.git'
124branch = 'rc4_ext_dispatch_reenabled'
125version = '2.0.0-rc4'
126
127[dependencies.sp-std]
128default-features = false
129git = 'https://github.com/usetech-llc/substrate.git'
130branch = 'rc4_ext_dispatch_reenabled'
131version = '2.0.0-rc4'
132
133[dependencies.sp-transaction-pool]
134default-features = false
135git = 'https://github.com/usetech-llc/substrate.git'
136branch = 'rc4_ext_dispatch_reenabled'
137version = '2.0.0-rc4'
138
139[dependencies.sp-version]
140default-features = false
141git = 'https://github.com/usetech-llc/substrate.git'
142branch = 'rc4_ext_dispatch_reenabled'
143version = '2.0.0-rc4'
144
145[dependencies.sudo]
146default-features = false
147git = 'https://github.com/usetech-llc/substrate.git'
148package = 'pallet-sudo'
149branch = 'rc4_ext_dispatch_reenabled'
150version = '2.0.0-rc4'
151
152[dependencies.system]
153default-features = false
154git = 'https://github.com/usetech-llc/substrate.git'
155package = 'frame-system'
156branch = 'rc4_ext_dispatch_reenabled'
157version = '2.0.0-rc4'
158
159[dependencies.nft]
160default-features = false
161package = 'pallet-nft'
162path = '../pallets/nft'
163version = '2.0.0-rc4'
164
165[dependencies.timestamp]
166default-features = false
167git = 'https://github.com/usetech-llc/substrate.git'
168package = 'pallet-timestamp'
169branch = 'rc4_ext_dispatch_reenabled'
170version = '2.0.0-rc4'
171
172[dependencies.transaction-payment]
173default-features = false
174git = 'https://github.com/usetech-llc/substrate.git'
175package = 'pallet-transaction-payment'
176branch = 'rc4_ext_dispatch_reenabled'
177version = '2.0.0-rc4'
178[build-dependencies.wasm-builder-runner]
179git = 'https://github.com/usetech-llc/substrate.git'
180package = 'substrate-wasm-builder-runner'
181branch = 'rc4_ext_dispatch_reenabled'
182version = '1.0.5'
183
184[package]1[package]
185authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']2authors = ['UseTech Professional <https://usetech.com/blockchain>']
186edition = '2018'3edition = '2018'
187homepage = 'https://substrate.io'4homepage = 'https://substrate.io'
188license = 'Unlicense'5license = 'All Rights Reserved'
189name = 'nft-runtime'6name = 'nft-runtime'
190repository = 'https://github.com/usetech-llc/nft_parachain/'7repository = 'https://github.com/usetech-llc/nft_parachain/'
191version = '2.0.0-rc4'8version = '2.1.0'
9
192[package.metadata.docs.rs]10[package.metadata.docs.rs]
193targets = ['x86_64-unknown-linux-gnu']11targets = ['x86_64-unknown-linux-gnu']
12
13[build-dependencies]
14wasm-builder-runner = { package = 'substrate-wasm-builder-runner', version = '1.0.5' }
15
16# alias "parity-scale-code" to "codec"
17[dependencies.codec]
18default-features = false
19features = ['derive']
20package = 'parity-scale-codec'
21version = '1.3.4'
22
23[dependencies]
24hex-literal = { optional = true, version = '0.3.1' }
25serde = { features = ['derive'], optional = true, version = '1.0.101' }
26
27# local dependencies
28pallet-nft = { path = '../pallets/nft', default-features = false, version = '2.1.0' }
29
30# Substrate dependencies
31frame-benchmarking = { default-features = false, optional = true, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
32frame-executive = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
33frame-support = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
34frame-system = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
35frame-system-benchmarking = { default-features = false, optional = true, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
36frame-system-rpc-runtime-api = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
37pallet-aura = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
38pallet-balances = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
39pallet-contracts = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
40pallet-contracts-primitives = { default-features = false, version = '2.0.1', git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
41pallet-contracts-rpc-runtime-api = { default-features = false, version = '0.8.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
42pallet-grandpa = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
43pallet-randomness-collective-flip = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
44pallet-sudo = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
45pallet-timestamp = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
46pallet-transaction-payment = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
47pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
48pallet-treasury = { version = "2.0.1", default-features = false, git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
49pallet-vesting = { version = "2.0.1", default-features = false, git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
50sp-api = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
51sp-arithmetic = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
52sp-block-builder = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
53sp-consensus-aura = { default-features = false, version = '0.8.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
54sp-core = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
55sp-inherents = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
56sp-offchain = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
57sp-runtime = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
58sp-session = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
59sp-std = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
60sp-transaction-pool = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
61sp-version = { default-features = false, version = '2.0.1' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'unique' }
62smallvec = "1.4.1"
19463
195[features]64[features]
196default = ['std']65default = ['std']
66runtime-benchmarks = [
67 'hex-literal',
68 'frame-benchmarking',
69 'frame-support/runtime-benchmarks',
70 'frame-system-benchmarking',
71 'frame-system/runtime-benchmarks',
72 'pallet-balances/runtime-benchmarks',
73 'pallet-timestamp/runtime-benchmarks',
74 'pallet-nft/runtime-benchmarks',
75 'sp-runtime/runtime-benchmarks',
76]
197std = [77std = [
198 'aura/std',78 'codec/std',
79 'serde',
80 'frame-executive/std',
81 'frame-support/std',
199 'balances/std',82 'frame-system/std',
83 'frame-system-rpc-runtime-api/std',
200 'codec/std',84 'pallet-aura/std',
85 'pallet-balances/std',
201 'contracts/std',86 'pallet-contracts/std',
202 'contracts-primitives/std',87 'pallet-contracts-primitives/std',
203 'contracts-rpc-runtime-api/std',88 'pallet-contracts-rpc-runtime-api/std',
89 'pallet-grandpa/std',
204 'frame-executive/std',90 'pallet-randomness-collective-flip/std',
205 'frame-support/std',91 'pallet-sudo/std',
92 'pallet-timestamp/std',
93 'pallet-transaction-payment/std',
94 'pallet-transaction-payment-rpc-runtime-api/std',
206 'grandpa/std',95 'pallet-treasury/std',
207 'randomness-collective-flip/std',96 'pallet-vesting/std',
97
208 'serde',98 'pallet-nft/std',
209 'sp-api/std',99 'sp-api/std',
210 'sp-block-builder/std',100 'sp-block-builder/std',
211 'sp-consensus-aura/std',101 'sp-consensus-aura/std',
212 'sp-core/std',102 'sp-core/std',
213 'sp-inherents/std',103 'sp-inherents/std',
214 'sp-io/std',
215 'sp-offchain/std',104 'sp-offchain/std',
216 'sp-runtime/std',105 'sp-runtime/std',
217 'sp-session/std',106 'sp-session/std',
218 'sp-std/std',107 'sp-std/std',
219 'sp-transaction-pool/std',108 'sp-transaction-pool/std',
220 'sp-version/std',109 'sp-version/std',
221 'sudo/std',110
222 'system/std',
223 'timestamp/std',
224 'transaction-payment/std',
225 'nft/std',
226]111]
227112
modifiedruntime/build.rsdiffbeforeafterboth
3fn main() {3fn main() {
4 WasmBuilder::new()4 WasmBuilder::new()
5 .with_current_project()5 .with_current_project()
6 .with_wasm_builder_from_crates("1.0.11")6 .with_wasm_builder_from_crates("2.0.0")
7 .export_heap_base()7 .export_heap_base()
8 .import_memory()8 .import_memory()
9 .build()9 .build()
addedruntime/src/chain_extension.rsdiffbeforeafterboth

no changes

modifiedruntime/src/lib.rsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
1//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.6//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.
27
8#[cfg(feature = "std")]13#[cfg(feature = "std")]
9include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));14include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
1015
11use contracts_rpc_runtime_api::ContractExecResult;
12use grandpa::fg_primitives;16use pallet_grandpa::fg_primitives;
13use grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList};17use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList};
14use sp_api::impl_runtime_apis;18use sp_api::impl_runtime_apis;
15use sp_consensus_aura::sr25519::AuthorityId as AuraId;19use sp_consensus_aura::sr25519::AuthorityId as AuraId;
16use sp_core::{crypto::KeyTypeId, OpaqueMetadata};20use sp_core::{ crypto::KeyTypeId, crypto::Public, OpaqueMetadata };
17use sp_runtime::{21use sp_runtime::{
22 Permill, Perbill, Percent,
23 ModuleId,
18 create_runtime_str, generic, impl_opaque_keys,24 create_runtime_str, generic, impl_opaque_keys,
19 traits::{25 traits::{
20 BlakeTwo256, Block as BlockT, IdentifyAccount, IdentityLookup, NumberFor, Saturating,26 Convert, ConvertInto, BlakeTwo256, Block as BlockT, IdentifyAccount,
21 Verify,27 IdentityLookup, NumberFor, Verify,
22 },28 },
23 transaction_validity::{TransactionSource, TransactionValidity},29 transaction_validity::{TransactionSource, TransactionValidity},
24 ApplyExtrinsicResult, MultiSignature,30 ApplyExtrinsicResult, MultiSignature,
25};31};
26use sp_std::prelude::*;
27#[cfg(feature = "std")]32#[cfg(feature = "std")]
28use sp_version::NativeVersion;33use sp_version::NativeVersion;
29use sp_version::RuntimeVersion;34use sp_version::RuntimeVersion;
3035pub use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment, CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
31// A few exports that help ease life for downstream crates.36// A few exports that help ease life for downstream crates.
32pub use balances::Call as BalancesCall;37pub use pallet_balances::Call as BalancesCall;
33pub use contracts::Schedule as ContractsSchedule;38pub use pallet_contracts::{Schedule as ContractsSchedule, WeightInfo};
34pub use frame_support::{39pub use frame_support::{
35 construct_runtime,40 construct_runtime,
36 dispatch::DispatchResult,41 dispatch::DispatchResult,
37 parameter_types,42 parameter_types,
43 StorageValue,
38 traits::{44 traits::{
39 Currency, ExistenceRequirement, Get, KeyOwnerProofSystem, OnUnbalanced, Randomness,45 Currency, ExistenceRequirement, Get, KeyOwnerProofSystem, OnUnbalanced, Randomness,
40 WithdrawReason,46 LockIdentifier,
41 },47 },
42 weights::{48 weights::{
43 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},49 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
44 DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight,50 DispatchInfo, GetDispatchInfo, Pays, PostDispatchInfo, Weight,
45 WeightToFeePolynomial,51 WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients
46 },52 },
47 StorageValue,
48};53};
49#[cfg(any(feature = "std", test))]54// #[cfg(any(feature = "std", test))]
50pub use sp_runtime::BuildStorage;55use frame_system::{
56 self as system,
57 EnsureRoot,
58 limits::{BlockWeights, BlockLength},
59};
51use sp_runtime::Perbill;60use sp_std::{prelude::*, marker::PhantomData};
52use system::{self as system};61use sp_arithmetic::{traits::{BaseArithmetic, Unsigned}};
62use smallvec::smallvec;
5363
54pub use timestamp::Call as TimestampCall;64pub use pallet_timestamp::Call as TimestampCall;
5565
56/// Importing a nft pallet66mod chain_extension;
67use crate::chain_extension::NFTExtension;
68
69/// Struct that handles the conversion of Balance -> `u64`. This is used for
70/// staking's election calculation.
71pub struct CurrencyToVoteHandler;
72
73impl CurrencyToVoteHandler {
74 fn factor() -> Balance {
75 (Balances::total_issuance() / u64::max_value() as Balance).max(1)
76 }
77}
78
79impl Convert<Balance, u64> for CurrencyToVoteHandler {
80 fn convert(x: Balance) -> u64 {
81 (x / Self::factor()) as u64
82 }
83}
84
85impl Convert<u128, Balance> for CurrencyToVoteHandler {
86 fn convert(x: u128) -> Balance {
87 x * Self::factor()
88 }
89}
90
91/// Re-export a nft pallet
92/// TODO: Check this re-export. Is this safe and good style?
93extern crate pallet_nft;
57pub use nft;94pub use pallet_nft::*;
5895
59/// An index to a block.96/// An index to a block.
60pub type BlockNumber = u32;97pub type BlockNumber = u32;
82/// Digest item type.119/// Digest item type.
83pub type DigestItem = generic::DigestItem<Hash>;120pub type DigestItem = generic::DigestItem<Hash>;
121
122mod nft_weights;
84123
85/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know124/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
86/// the specifics of the runtime. They can then be made to be agnostic over specific formats125/// the specifics of the runtime. They can then be made to be agnostic over specific formats
111 spec_name: create_runtime_str!("nft"),150 spec_name: create_runtime_str!("nft"),
112 impl_name: create_runtime_str!("nft"),151 impl_name: create_runtime_str!("nft"),
113 authoring_version: 1,152 authoring_version: 1,
114 spec_version: 2,153 spec_version: 3,
115 impl_version: 1,154 impl_version: 1,
116 apis: RUNTIME_API_VERSIONS,155 apis: RUNTIME_API_VERSIONS,
117 transaction_version: 1,156 transaction_version: 1,
135 }174 }
136}175}
176
177/// Provides a membership set with only the configured aura users
178pub struct ValiudatorsOnly<Runtime: pallet_aura::Config>(PhantomData<Runtime>);
179impl frame_support::traits::Contains<AccountId> for ValiudatorsOnly<Runtime> {
180 fn contains(t: &AccountId) -> bool {
181 let arr: [u8; 32] = *t.as_ref();
182 let raw_key: Vec<u8> = Vec::from(arr);
183
184 match pallet_aura::Module::<Runtime>::authorities().iter().find(|auth| auth.to_raw_vec() == raw_key) {
185 Some(_) => true,
186 None => false,
187 }
188 }
189 fn sorted_members() -> Vec<AccountId> {
190 let mut members: Vec<AccountId> = Vec::new();
191 for auth in pallet_aura::Module::<Runtime>::authorities() {
192 let mut arr: [u8; 32] = Default::default();
193 let bor_arr = auth.clone().to_raw_vec();
194 let slice = bor_arr.as_slice();
195 arr.copy_from_slice(slice);
196 members.push(AccountId::from(arr));
197 }
198 members
199 }
200 fn count() -> usize {
201 pallet_aura::Module::<Runtime>::authorities().len()
202 }
203}
204
205impl frame_support::traits::ContainsLengthBound for ValiudatorsOnly<Runtime> {
206 fn min_len() -> usize {
207 1
208 }
209 fn max_len() -> usize {
210 100
211 }
212}
213
214type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;
215
216pub struct DealWithFees;
217impl OnUnbalanced<NegativeImbalance> for DealWithFees {
218 fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item=NegativeImbalance>) {
219 if let Some(fees) = fees_then_tips.next() {
220 // for fees, 100% to treasury
221 let mut split = fees.ration(100, 0);
222 if let Some(tips) = fees_then_tips.next() {
223 // for tips, if any, 100% to treasury
224 tips.ration_merge_into(100, 0, &mut split);
225 }
226 Treasury::on_unbalanced(split.0);
227 // Author::on_unbalanced(split.1);
228 }
229 }
230}
231
232/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
233/// This is used to limit the maximal weight of a single extrinsic.
234const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
235/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used
236/// by Operational extrinsics.
237const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
238/// We allow for 2 seconds of compute with a 6 second average block time.
239const MAXIMUM_BLOCK_WEIGHT: Weight = 2 * WEIGHT_PER_SECOND;
137240
138parameter_types! {241parameter_types! {
139 pub const BlockHashCount: BlockNumber = 2400;242 pub const BlockHashCount: BlockNumber = 2400;
140 /// We allow for 2 seconds of compute with a 6 second average block time.
141 pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;243 pub RuntimeBlockLength: BlockLength =
244 BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
142 pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);245 pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
143 /// Assume 10% of weight for average on_initialize calls.
144 pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()246 pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
247 pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()
248 .base_block(BlockExecutionWeight::get())
145 .saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();249 .for_class(DispatchClass::all(), |weights| {
250 weights.base_extrinsic = ExtrinsicBaseWeight::get();
251 })
252 .for_class(DispatchClass::Normal, |weights| {
146 pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;253 weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
254 })
255 .for_class(DispatchClass::Operational, |weights| {
256 weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);
257 // Operational transactions have some extra reserved space, so that they
258 // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.
259 weights.reserved = Some(
260 MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT
261 );
262 })
263 .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
264 .build_or_panic();
147 pub const Version: RuntimeVersion = VERSION;265 pub const Version: RuntimeVersion = VERSION;
266 pub const SS58Prefix: u8 = 42;
148}267}
149268
150impl system::Trait for Runtime {269impl system::Config for Runtime {
151 /// The basic call filter to use in dispatchable.270 /// The basic call filter to use in dispatchable.
152 type BaseCallFilter = ();271 type BaseCallFilter = ();
153 /// The identifier used to distinguish between accounts.272 /// The identifier used to distinguish between accounts.
172 type Origin = Origin;291 type Origin = Origin;
173 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).292 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).
174 type BlockHashCount = BlockHashCount;293 type BlockHashCount = BlockHashCount;
175 /// Maximum weight of each block.
176 type MaximumBlockWeight = MaximumBlockWeight;
177 /// The weight of database operations that the runtime can invoke.294 /// The weight of database operations that the runtime can invoke.
178 type DbWeight = RocksDbWeight;295 type DbWeight = RocksDbWeight;
179 /// The weight of the overhead invoked on the block import process, independent of the296 /// The weight of the overhead invoked on the block import process, independent of the
180 /// extrinsics included in that block.297 /// extrinsics included in that block.
181 type BlockExecutionWeight = BlockExecutionWeight;298 type BlockWeights = RuntimeBlockWeights;
182 /// The base weight of any extrinsic processed by the runtime, independent of the
183 /// logic of that extrinsic. (Signature verification, nonce increment, fee, etc...)
184 type ExtrinsicBaseWeight = ExtrinsicBaseWeight;
185 /// The maximum weight that a single extrinsic of `Normal` dispatch class can have,
186 /// idependent of the logic of that extrinsics. (Roughly max block weight - average on
187 /// initialize cost).
188 type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
189 /// Maximum size of all encoded transactions (in bytes) that are allowed in one block.
190 type MaximumBlockLength = MaximumBlockLength;
191 /// Portion of the block weight that is available to all normal transactions.
192 type AvailableBlockRatio = AvailableBlockRatio;
193 /// Version of the runtime.299 /// Version of the runtime.
194 type Version = Version;300 type Version = Version;
195 /// Converts a module to the index of the module in `construct_runtime!`.
196 /// This type is being generated by `construct_runtime!`.301 /// This type is being generated by `construct_runtime!`.
197 type ModuleToIndex = ModuleToIndex;302 type PalletInfo = PalletInfo;
198 /// What to do if a new account is created.303 /// What to do if a new account is created.
199 type OnNewAccount = ();304 type OnNewAccount = ();
200 /// What to do if an account is fully reaped from the system.305 /// What to do if an account is fully reaped from the system.
201 type OnKilledAccount = ();306 type OnKilledAccount = ();
202 /// The data to be stored in an account.307 /// The data to be stored in an account.
203 type AccountData = balances::AccountData<Balance>;308 type AccountData = pallet_balances::AccountData<Balance>;
309 /// Weight information for the extrinsics of this pallet.
310 type SystemWeightInfo = system::weights::SubstrateWeight<Runtime>;
311
312 type BlockLength = RuntimeBlockLength;
313 type SS58Prefix = SS58Prefix;
204}314}
205315
206impl aura::Trait for Runtime {316impl pallet_aura::Config for Runtime {
207 type AuthorityId = AuraId;317 type AuthorityId = AuraId;
208}318}
209319
210impl grandpa::Trait for Runtime {320impl pallet_grandpa::Config for Runtime {
211 type Event = Event;321 type Event = Event;
212 type Call = Call;322 type Call = Call;
213323
223333
224 type HandleEquivocation = ();334 type HandleEquivocation = ();
335
336 type WeightInfo = ();
225}337}
226338
227parameter_types! {339parameter_types! {
228 pub const MinimumPeriod: u64 = SLOT_DURATION / 2;340 pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
229}341}
230342
231impl timestamp::Trait for Runtime {343impl pallet_timestamp::Config for Runtime {
232 /// A timestamp: milliseconds since the unix epoch.344 /// A timestamp: milliseconds since the unix epoch.
233 type Moment = u64;345 type Moment = u64;
234 type OnTimestampSet = Aura;346 type OnTimestampSet = Aura;
235 type MinimumPeriod = MinimumPeriod;347 type MinimumPeriod = MinimumPeriod;
348 type WeightInfo = ();
236}349}
237350
238parameter_types! {351parameter_types! {
239 // pub const ExistentialDeposit: u128 = 500;352 // pub const ExistentialDeposit: u128 = 500;
240 pub const ExistentialDeposit: u128 = 0;353 pub const ExistentialDeposit: u128 = 0;
354 pub const MaxLocks: u32 = 50;
241}355}
242356
243impl balances::Trait for Runtime {357impl pallet_balances::Config for Runtime {
358 type MaxLocks = MaxLocks;
244 /// The type for recording an account's balance.359 /// The type for recording an account's balance.
245 type Balance = Balance;360 type Balance = Balance;
246 /// The ubiquitous event type.361 /// The ubiquitous event type.
247 type Event = Event;362 type Event = Event;
248 type DustRemoval = ();363 type DustRemoval = Treasury;
249 type ExistentialDeposit = ExistentialDeposit;364 type ExistentialDeposit = ExistentialDeposit;
250 type AccountStore = System;365 type AccountStore = System;
366 type WeightInfo = ();
251}367}
252368
253pub const MILLICENTS: Balance = 1_000_000_000;369pub const MICROUNIQUE: Balance = 1_000_000_000;
254pub const CENTS: Balance = 1_000 * MILLICENTS;370pub const MILLIUNIQUE: Balance = 1_000 * MICROUNIQUE;
371pub const CENTIUNIQUE: Balance = 10 * MILLIUNIQUE;
255pub const DOLLARS: Balance = 100 * CENTS;372pub const UNIQUE: Balance = 100 * CENTIUNIQUE;
373
374pub const fn deposit(items: u32, bytes: u32) -> Balance {
375 items as Balance * 15 * CENTIUNIQUE + (bytes as Balance) * 6 * CENTIUNIQUE
376}
256377
257parameter_types! {378parameter_types! {
258 pub const TombstoneDeposit: Balance = 16 * MILLICENTS;379 pub const TombstoneDeposit: Balance = deposit(
380 0,
381 sp_std::mem::size_of::<pallet_contracts::ContractInfo<Runtime>>() as u32
382 );
259 pub const RentByteFee: Balance = 4 * MILLICENTS;383 pub const DepositPerContract: Balance = TombstoneDeposit::get();
260 pub const RentDepositOffset: Balance = 1000 * MILLICENTS;384 pub const DepositPerStorageByte: Balance = deposit(0, 1);
385 pub const DepositPerStorageItem: Balance = deposit(1, 0);
386 pub RentFraction: Perbill = Perbill::from_rational_approximation(1u32, 30 * DAYS);
261 pub const SurchargeReward: Balance = 150 * MILLICENTS;387 pub const SurchargeReward: Balance = 150 * MILLIUNIQUE;
388 pub const SignedClaimHandicap: u32 = 2;
389 pub const MaxDepth: u32 = 32;
390 pub const MaxValueSize: u32 = 16 * 1024;
391 // The lazy deletion runs inside on_initialize.
392 pub DeletionWeightLimit: Weight = AVERAGE_ON_INITIALIZE_RATIO *
393 RuntimeBlockWeights::get().max_block;
394 // The weight needed for decoding the queue should be less or equal than a fifth
395 // of the overall weight dedicated to the lazy deletion.
396 pub DeletionQueueDepth: u32 = ((DeletionWeightLimit::get() / (
397 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -
398 <Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)
399 )) / 5) as u32;
262}400}
401
263402
264impl contracts::Trait for Runtime {403impl pallet_contracts::Config for Runtime {
265 type Call = Call;
266 type Time = Timestamp;404 type Time = Timestamp;
267 type Randomness = RandomnessCollectiveFlip;405 type Randomness = RandomnessCollectiveFlip;
268 type Currency = Balances;406 type Currency = Balances;
269 type Event = Event;407 type Event = Event;
270 type DetermineContractAddress = contracts::SimpleAddressDeterminer<Runtime>;
271 type TrieIdGenerator = contracts::TrieIdFromParentCounter<Runtime>;
272 type RentPayment = ();408 type RentPayment = ();
273 type SignedClaimHandicap = contracts::DefaultSignedClaimHandicap;409 type SignedClaimHandicap = SignedClaimHandicap;
274 type TombstoneDeposit = TombstoneDeposit;410 type TombstoneDeposit = TombstoneDeposit;
275 type StorageSizeOffset = contracts::DefaultStorageSizeOffset;411 type DepositPerContract = DepositPerContract;
276 type RentByteFee = RentByteFee;412 type DepositPerStorageByte = DepositPerStorageByte;
277 type RentDepositOffset = RentDepositOffset;413 type DepositPerStorageItem = DepositPerStorageItem;
414 type RentFraction = RentFraction;
278 type SurchargeReward = SurchargeReward;415 type SurchargeReward = SurchargeReward;
279 type MaxDepth = contracts::DefaultMaxDepth;416 type MaxDepth = MaxDepth;
280 type MaxValueSize = contracts::DefaultMaxValueSize;417 type MaxValueSize = MaxValueSize;
281 type WeightPrice = transaction_payment::Module<Self>;418 type WeightPrice = pallet_transaction_payment::Module<Self>;
419 type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;
420 type ChainExtension = NFTExtension;
421 type DeletionQueueDepth = DeletionQueueDepth;
422 type DeletionWeightLimit = DeletionWeightLimit;
282}423}
283424
284parameter_types! {425parameter_types! {
285 pub const TransactionByteFee: Balance = 1;426 pub const TransactionByteFee: Balance = 501 * MICROUNIQUE; // Targeting 0.1 Unique per NFT transfer
286}427}
428
429/// Linear implementor of `WeightToFeePolynomial`
430pub struct LinearFee<T>(sp_std::marker::PhantomData<T>);
431
432impl<T> WeightToFeePolynomial for LinearFee<T> where
433 T: BaseArithmetic + From<u32> + Copy + Unsigned
434{
435 type Balance = T;
436
437 fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
438 smallvec!(WeightToFeeCoefficient {
439 coeff_integer: 146_700u32.into(), // Targeting 0.1 Unique per NFT transfer
440 coeff_frac: Perbill::zero(),
441 negative: false,
442 degree: 1,
443 })
444 }
445}
287446
288impl transaction_payment::Trait for Runtime {447impl pallet_transaction_payment::Config for Runtime {
289 type Currency = balances::Module<Runtime>;448 type OnChargeTransaction = CurrencyAdapter<Balances, DealWithFees>;
290 type OnTransactionPayment = ();
291 type TransactionByteFee = TransactionByteFee;449 type TransactionByteFee = TransactionByteFee;
292 type WeightToFee = IdentityFee<Balance>;450 type WeightToFee = LinearFee<Balance>;
293 type FeeMultiplierUpdate = ();451 type FeeMultiplierUpdate = ();
294}452}
453
454parameter_types! {
455 pub const ProposalBond: Permill = Permill::from_percent(5);
456 pub const ProposalBondMinimum: Balance = 1 * UNIQUE;
457 pub const SpendPeriod: BlockNumber = 5 * MINUTES;
458 pub const Burn: Permill = Permill::from_percent(0);
459 pub const TipCountdown: BlockNumber = 1 * DAYS;
460 pub const TipFindersFee: Percent = Percent::from_percent(20);
461 pub const TipReportDepositBase: Balance = 1 * UNIQUE;
462 pub const DataDepositPerByte: Balance = 1 * CENTIUNIQUE;
463 pub const BountyDepositBase: Balance = 1 * UNIQUE;
464 pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS;
465 pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry");
466 pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS;
467 pub const MaximumReasonLength: u32 = 16384;
468 pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
469 pub const BountyValueMinimum: Balance = 5 * UNIQUE;
470}
471
472impl pallet_treasury::Config for Runtime {
473 type ModuleId = TreasuryModuleId;
474 type Currency = Balances;
475 type ApproveOrigin = EnsureRoot<AccountId>;
476 type RejectOrigin = EnsureRoot<AccountId>;
477 type Event = Event;
478 type OnSlash = ();
479 type ProposalBond = ProposalBond;
480 type ProposalBondMinimum = ProposalBondMinimum;
481 type SpendPeriod = SpendPeriod;
482 type Burn = Burn;
483 type BurnDestination = ();
484 type SpendFunds = ();
485 type WeightInfo = pallet_treasury::weights::SubstrateWeight<Runtime>;
486}
295487
296impl sudo::Trait for Runtime {488impl pallet_sudo::Config for Runtime {
297 type Event = Event;489 type Event = Event;
298 type Call = Call;490 type Call = Call;
299}491}
492
493parameter_types! {
494 pub const MinVestedTransfer: Balance = 10 * UNIQUE;
495}
496
497impl pallet_vesting::Config for Runtime {
498 type Event = Event;
499 type Currency = Balances;
500 type BlockNumberToBalance = ConvertInto;
501 type MinVestedTransfer = MinVestedTransfer;
502 type WeightInfo = ();
503}
300504
301/// Used for the module nft in `./nft.rs`505/// Used for the module nft in `./nft.rs`
302impl nft::Trait for Runtime {506impl pallet_nft::Config for Runtime {
303 type Event = Event;507 type Event = Event;
508 type WeightInfo = nft_weights::WeightInfo;
304}509}
305510
306construct_runtime!(511construct_runtime!(
310 UncheckedExtrinsic = UncheckedExtrinsic515 UncheckedExtrinsic = UncheckedExtrinsic
311 {516 {
312 System: system::{Module, Call, Config, Storage, Event<T>},517 System: system::{Module, Call, Config, Storage, Event<T>},
313 RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},518 RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
314 Contracts: contracts::{Module, Call, Config, Storage, Event<T>},519 Contracts: pallet_contracts::{Module, Call, Config<T>, Storage, Event<T>},
315 Timestamp: timestamp::{Module, Call, Storage, Inherent},520 Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
316 Aura: aura::{Module, Config<T>, Inherent(Timestamp)},521 Aura: pallet_aura::{Module, Config<T>, Inherent},
317 Grandpa: grandpa::{Module, Call, Storage, Config, Event},522 Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
318 Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},523 Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
319 TransactionPayment: transaction_payment::{Module, Storage},524 TransactionPayment: pallet_transaction_payment::{Module, Storage},
320 Sudo: sudo::{Module, Call, Config<T>, Storage, Event<T>},525 Sudo: pallet_sudo::{Module, Call, Config<T>, Storage, Event<T>},
321 Nft: nft::{Module, Call, Storage, Event<T>},526 Nft: pallet_nft::{Module, Call, Config<T>, Storage, Event<T>},
527 Treasury: pallet_treasury::{Module, Call, Storage, Config, Event<T>},
528 Vesting: pallet_vesting::{Module, Call, Config<T>, Storage, Event<T>},
322 }529 }
323);530);
324531
340 system::CheckEra<Runtime>,547 system::CheckEra<Runtime>,
341 system::CheckNonce<Runtime>,548 system::CheckNonce<Runtime>,
342 system::CheckWeight<Runtime>,549 system::CheckWeight<Runtime>,
343 nft::ChargeTransactionPayment<Runtime>,550 pallet_nft::ChargeTransactionPayment<Runtime>,
344);551);
345/// Unchecked extrinsic type as expected by this runtime.552/// Unchecked extrinsic type as expected by this runtime.
346pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;553pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
352559
353impl_runtime_apis! {560impl_runtime_apis! {
354561
355 impl contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber>562 impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber>
356 for Runtime563 for Runtime
357 {564 {
358 fn call(565 fn call(
361 value: Balance,568 value: Balance,
362 gas_limit: u64,569 gas_limit: u64,
363 input_data: Vec<u8>,570 input_data: Vec<u8>,
364 ) -> ContractExecResult {571 ) -> pallet_contracts_primitives::ContractExecResult {
365 let exec_result =
366 Contracts::bare_call(origin, dest.into(), value, gas_limit, input_data);572 Contracts::bare_call(origin, dest, value, gas_limit, input_data)
367 match exec_result {
368 Ok(v) => ContractExecResult::Success {
369 status: v.status,
370 data: v.data,
371 },
372 Err(_) => ContractExecResult::Error,
373 }
374 }573 }
375574
376 fn get_storage(575 fn get_storage(
377 address: AccountId,576 address: AccountId,
378 key: [u8; 32],577 key: [u8; 32],
379 ) -> contracts_primitives::GetStorageResult {578 ) -> pallet_contracts_primitives::GetStorageResult {
380 Contracts::get_storage(address, key)579 Contracts::get_storage(address, key)
381 }580 }
382581
383 fn rent_projection(582 fn rent_projection(
384 address: AccountId,583 address: AccountId,
385 ) -> contracts_primitives::RentProjectionResult<BlockNumber> {584 ) -> pallet_contracts_primitives::RentProjectionResult<BlockNumber> {
386 Contracts::rent_projection(address)585 Contracts::rent_projection(address)
387 }586 }
388 }587 }
474 Grandpa::grandpa_authorities()673 Grandpa::grandpa_authorities()
475 }674 }
476675
477 fn submit_report_equivocation_extrinsic(676 fn submit_report_equivocation_unsigned_extrinsic(
478 _equivocation_proof: fg_primitives::EquivocationProof<677 _equivocation_proof: fg_primitives::EquivocationProof<
479 <Block as BlockT>::Hash,678 <Block as BlockT>::Hash,
480 NumberFor<Block>,679 NumberFor<Block>,
495 }694 }
496 }695 }
696
697 impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
698 fn account_nonce(account: AccountId) -> Index {
699 System::account_nonce(account)
700 }
701 }
702
703 impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
704 fn query_info(uxt: <Block as BlockT>::Extrinsic, len: u32) -> RuntimeDispatchInfo<Balance> {
705 TransactionPayment::query_info(uxt, len)
706 }
707 fn query_fee_details(uxt: <Block as BlockT>::Extrinsic, len: u32) -> FeeDetails<Balance> {
708 TransactionPayment::query_fee_details(uxt, len)
709 }
710 }
711
712 #[cfg(feature = "runtime-benchmarks")]
713 impl frame_benchmarking::Benchmark<Block> for Runtime {
714 fn dispatch_benchmark(
715 config: frame_benchmarking::BenchmarkConfig
716 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
717 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
718
719 let whitelist: Vec<TrackedStorageKey> = vec![
720 // Alice account
721 hex_literal::hex!("d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d").to_vec().into(),
722 // // Total Issuance
723 // hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
724 // // Execution Phase
725 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
726 // // Event Count
727 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
728 // // System Events
729 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
730 ];
731
732 let mut batches = Vec::<BenchmarkBatch>::new();
733 let params = (&config, &whitelist);
734
735 add_benchmark!(params, batches, pallet_nft, Nft);
736
737 if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
738 Ok(batches)
739 }
740 }
497}741}
498742
addedruntime/src/nft_weights.rsdiffbeforeafterboth

no changes

addedruntime_types.jsondiffbeforeafterboth

no changes

addedsmart_contracs/transfer/.gitignorediffbeforeafterboth

no changes

addedsmart_contracs/transfer/Cargo.tomldiffbeforeafterboth

no changes

addedsmart_contracs/transfer/lib.rsdiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/.gitignorediffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/Cargo.tomldiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/LICENSEdiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/README.mddiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/calls/.gitignorediffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/calls/.ink/abi_gen/Cargo.tomldiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/calls/.ink/abi_gen/main.rsdiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/calls/Cargo.tomldiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/calls/lib.rsdiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/src/calls.rsdiffbeforeafterboth

no changes

deletedsmart_contract/ink-types-node-runtime/src/lib.rsdiffbeforeafterboth

no changes

addedtests/.vscode/settings.jsondiffbeforeafterboth

no changes

addedtests/README.mddiffbeforeafterboth

no changes

addedtests/flipper-src/.gitignorediffbeforeafterboth

no changes

addedtests/flipper-src/Cargo.tomldiffbeforeafterboth

no changes

addedtests/flipper-src/build.shdiffbeforeafterboth

no changes

addedtests/flipper-src/lib.rsdiffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/.gitignorediffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/Cargo.tomldiffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/README.mddiffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/examples/calls/.gitignorediffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/examples/calls/.ink/abi_gen/Cargo.tomldiffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/examples/calls/.ink/abi_gen/main.rsdiffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/examples/calls/Cargo.tomldiffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/examples/calls/lib.rsdiffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/src/calls.rsdiffbeforeafterboth

no changes

addedtests/ink-types-node-runtime/src/lib.rsdiffbeforeafterboth

no changes

addedtests/loadtester-src/.gitignorediffbeforeafterboth

no changes

addedtests/loadtester-src/Cargo.tomldiffbeforeafterboth

no changes

addedtests/loadtester-src/lib.rsdiffbeforeafterboth

no changes

deletedtests/package-lock.jsondiffbeforeafterboth

no changes

modifiedtests/package.jsondiffbeforeafterboth
4 "description": "Substrate Nft tests",4 "description": "Substrate Nft tests",
5 "main": "",5 "main": "",
6 "devDependencies": {6 "devDependencies": {
7 "@polkadot/dev": "^0.52.11",7 "@polkadot/dev": "^0.61.24",
8 "@polkadot/ts": "^0.3.41",8 "@polkadot/ts": "^0.3.59",
9 "@types/bn.js": "^4.11.6",9 "@polkadot/typegen": "^3.6.4",
10 "@polkadot/util-crypto": "^5.4.4",
10 "@types/chai": "^4.2.12",11 "@types/chai": "^4.2.12",
11 "@types/chai-as-promised": "^7.1.3",12 "@types/chai-as-promised": "^7.1.3",
12 "@types/mocha": "^8.0.3",13 "@types/mocha": "^8.0.3",
17 "typescript": "^3.9.7"18 "typescript": "^3.9.7"
18 },19 },
19 "scripts": {20 "scripts": {
20 "test": "mocha --timeout 9999999 -r ts-node/register ./**/*.test.ts"21 "test": "mocha --timeout 9999999 -r ts-node/register ./**/*.test.ts",
22 "load": "mocha --timeout 9999999 -r ts-node/register ./**/*.load.ts",
23 "loadTransfer": "ts-node src/transfer.nload.ts",
24 "testAddCollectionAdmin": "mocha --timeout 9999999 -r ts-node/register ./**/addCollectionAdmin.test.ts",
25 "testSetSchemaVersion": "mocha --timeout 9999999 -r ts-node/register ./**/setSchemaVersion.test.ts",
26 "testSetVariableMetaData": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetaData.test.ts",
27 "testSetCollectionLimits": "mocha --timeout 9999999 -r ts-node/register ./**/setCollectionLimits.test.ts",
28 "testRemoveCollectionAdmin": "mocha --timeout 9999999 -r ts-node/register ./**/removeCollectionAdmin.test.ts",
29 "testRemoveFromWhiteList": "mocha --timeout 9999999 -r ts-node/register ./**/removeFromWhiteList.test.ts",
30 "testConnection": "mocha --timeout 9999999 -r ts-node/register ./**/connection.test.ts",
31 "testCollection": "mocha --timeout 9999999 -r ts-node/register ./**/createCollection.test.ts",
32 "testCreateItem": "mocha --timeout 9999999 -r ts-node/register ./**/createItem.test.ts",
33 "testCreateMultipleItems": "mocha --timeout 9999999 -r ts-node/register ./**/createMultipleItems.test.ts",
34 "testApprove": "mocha --timeout 9999999 -r ts-node/register ./**/approve.test.ts",
35 "testTransferFrom": "mocha --timeout 9999999 -r ts-node/register ./**/transferFrom.test.ts",
36 "testCreateCollection": "mocha --timeout 9999999 -r ts-node/register ./**/createCollection.test.ts",
37 "testToggleContractWhiteList": "mocha --timeout 9999999 -r ts-node/register ./**/toggleContractWhiteList.test.ts",
38 "testAddToContractWhiteList": "mocha --timeout 9999999 -r ts-node/register ./**/addToContractWhiteList.test.ts",
39 "testTransfer": "mocha --timeout 9999999 -r ts-node/register ./**/transfer.test.ts",
40 "testBurnItem": "mocha --timeout 9999999 -r ts-node/register ./**/burnItem.test.ts",
41 "testSetMintPermission": "mocha --timeout 9999999 -r ts-node/register ./**/setMintPermission.test.ts",
42 "testCreditFeesToTreasury": "mocha --timeout 9999999 -r ts-node/register ./**/creditFeesToTreasury.test.ts",
43 "testEnableContractSponsoring": "mocha --timeout 9999999 -r ts-node/register ./**/enableContractSponsoring.test.ts",
44 "testSetContractSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setContractSponsoringRateLimit.test.ts",
45 "testSetOffchainSchema": "mocha --timeout 9999999 -r ts-node/register ./**/setOffchainSchema.test.ts",
46 "testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts"
21 },47 },
22 "author": "",48 "author": "",
23 "license": "Apache 2.0",49 "license": "SEE LICENSE IN ../LICENSE",
24 "homepage": "",50 "homepage": "",
25 "dependencies": {51 "dependencies": {
26 "@polkadot/api": "^1.31.2",52 "@polkadot/api": "3.8.1",
27 "@polkadot/types": "^1.31.2",53 "@polkadot/api-contract": "3.8.1",
28 "@polkadot/util": "^2.18.1",54 "@polkadot/util": "5.6.2",
29 "@types/bn.js": "^4.11.6",55 "bignumber.js": "^9.0.0",
30 "chai-as-promised": "^7.1.1"56 "chai-as-promised": "^7.1.1"
31 },57 },
32 "standard": {58 "standard": {
addedtests/src/accounts.tsdiffbeforeafterboth

no changes

addedtests/src/addCollectionAdmin.test.tsdiffbeforeafterboth

no changes

addedtests/src/addToContractWhiteList.test.tsdiffbeforeafterboth

no changes

addedtests/src/addToWhiteList.test.tsdiffbeforeafterboth

no changes

addedtests/src/approve.test.tsdiffbeforeafterboth

no changes

addedtests/src/balance-transfer-contract/calls.wasmdiffbeforeafterboth

binary blob — no preview

addedtests/src/balance-transfer-contract/metadata.jsondiffbeforeafterboth

no changes

addedtests/src/blocks-production.test.tsdiffbeforeafterboth

no changes

addedtests/src/burnItem.test.tsdiffbeforeafterboth

no changes

addedtests/src/change-collection-owner.test.tsdiffbeforeafterboth

no changes

modifiedtests/src/config.tsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
1import process from 'process';6import process from 'process';
27
3const config = {8const config = {
4 substrateUrl: process.env.substrateUrl || 'ws://127.0.0.1:9944',9 substrateUrl: process.env.substrateUrl || 'ws://127.0.0.1:9944'
5 customTypes: process.env.customTypes || `{
6 "Schedule": {
7 "version": "u32",
8 "put_code_per_byte_cost": "Gas",
9 "grow_mem_cost": "Gas",
10 "regular_op_cost": "Gas",
11 "return_data_per_byte_cost": "Gas",
12 "event_data_per_byte_cost": "Gas",
13 "event_per_topic_cost": "Gas",
14 "event_base_cost": "Gas",
15 "call_base_cost": "Gas",
16 "instantiate_base_cost": "Gas",
17 "dispatch_base_cost": "Gas",
18 "sandbox_data_read_cost": "Gas",
19 "sandbox_data_write_cost": "Gas",
20 "transfer_cost": "Gas",
21 "instantiate_cost": "Gas",
22 "max_event_topics": "u32",
23 "max_stack_height": "u32",
24 "max_memory_pages": "u32",
25 "max_table_size": "u32",
26 "enable_println": "bool",
27 "max_subject_len": "u32"
28 },
29 "CollectionMode": {
30 "_enum": {
31 "Invalid": null,
32 "NFT": "u32",
33 "Fungible": "u32",
34 "ReFungible": "(u32, u32)"
35 }
36 },
37 "NftItemType": {
38 "Collection": "u64",
39 "Owner": "AccountId",
40 "Data": "Vec<u8>"
41 },
42 "Ownership": {
43 "owner": "AccountId",
44 "fraction": "u128"
45 },
46 "ReFungibleItemType": {
47 "Collection": "u64",
48 "Owner": "Vec<Ownership<AccountId>>",
49 "Data": "Vec<u8>"
50 },
51 "CollectionType": {
52 "Owner": "AccountId",
53 "Mode": "CollectionMode",
54 "Access": "u8",
55 "DecimalPoints": "u32",
56 "Name": "Vec<u16>",
57 "Description": "Vec<u16>",
58 "TokenPrefix": "Vec<u8>",
59 "CustomDataSize": "u32",
60 "OffchainSchema": "Vec<u8>",
61 "Sponsor": "AccountId",
62 "UnconfirmedSponsor": "AccountId"
63 },
64 "RawData": "Vec<u8>",
65 "Address": "AccountId",
66 "LookupSource": "AccountId",
67 "Weight": "u64"
68 }`
69}10}
7011
71export default config;12export default config;
addedtests/src/confirmSponsorship.test.tsdiffbeforeafterboth

no changes

modifiedtests/src/connection.test.tsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
1import usingApi from "./substrate/substrate-api";6import usingApi from "./substrate/substrate-api";
2import { WsProvider } from '@polkadot/api';7import { WsProvider } from '@polkadot/api';
712
8const expect = chai.expect;13const expect = chai.expect;
914
10describe('Connection', () => {15describe('Connection smoke test', () => {
11 it('Connection can be established', async () => {16 it('Connection can be established', async () => {
12 await usingApi(async api => {17 await usingApi(async api => {
13 const health = await api.rpc.system.health();18 const health = await api.rpc.system.health();
14 expect(health).to.be.not.empty;19 expect(health).to.be.not.empty;
15 });20 });
16 });21 });
1722
18 it('Cannot connect to 0.0.0.0', () => {23 it('Cannot connect to 255.255.255.255', async () => {
24 const log = console.log;
25 const error = console.error;
26 console.log = function () {};
27 console.error = function () {};
28
19 const neverConnectProvider = new WsProvider('ws://0.0.0.0:9944');29 const neverConnectProvider = new WsProvider('ws://255.255.255.255:9944');
20 expect((async () => {30 await expect((async () => {
21 await usingApi(async api => {31 await usingApi(async api => {
22 const health = await api.rpc.system.health();32 const health = await api.rpc.system.health();
23 }, { provider: neverConnectProvider });33 }, { provider: neverConnectProvider });
24 })()).to.be.eventually.rejected;34 })()).to.be.eventually.rejected;
35
36 console.log = log;
37 console.error = error;
25 });38 });
26});39});
addedtests/src/contracts.test.tsdiffbeforeafterboth

no changes

addedtests/src/createCollection.test.tsdiffbeforeafterboth

no changes

addedtests/src/createItem.test.tsdiffbeforeafterboth

no changes

addedtests/src/createMultipleItems.test.tsdiffbeforeafterboth

no changes

addedtests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth

no changes

addedtests/src/destroyCollection.test.tsdiffbeforeafterboth

no changes

addedtests/src/enableContractSponsoring.test.tsdiffbeforeafterboth

no changes

addedtests/src/flipper/flipper.wasmdiffbeforeafterboth

binary blob — no preview

addedtests/src/flipper/metadata.jsondiffbeforeafterboth

no changes

addedtests/src/load_test_sc/loadtester.wasmdiffbeforeafterboth

binary blob — no preview

addedtests/src/load_test_sc/metadata.jsondiffbeforeafterboth

no changes

addedtests/src/overflow.test.tsdiffbeforeafterboth

no changes

addedtests/src/pallet-presence.test.tsdiffbeforeafterboth

no changes

addedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth

no changes

addedtests/src/removeCollectionSponsor.test.tsdiffbeforeafterboth

no changes

addedtests/src/removeFromContractWhiteList.test.tsdiffbeforeafterboth

no changes

addedtests/src/removeFromWhiteList.test.tsdiffbeforeafterboth

no changes

addedtests/src/rpc.load.tsdiffbeforeafterboth

no changes

addedtests/src/setCollectionLimits.test.tsdiffbeforeafterboth

no changes

addedtests/src/setCollectionSponsor.test.tsdiffbeforeafterboth

no changes

addedtests/src/setConstOnChainSchema.test.tsdiffbeforeafterboth

no changes

addedtests/src/setContractSponsoringRateLimit.test.tsdiffbeforeafterboth

no changes

addedtests/src/setMintPermission.test.tsdiffbeforeafterboth

no changes

addedtests/src/setOffchainSchema.test.tsdiffbeforeafterboth

no changes

addedtests/src/setPublicAccessMode.test.tsdiffbeforeafterboth

no changes

addedtests/src/setSchemaVersion.test.tsdiffbeforeafterboth

no changes

addedtests/src/setVariableMetaData.test.tsdiffbeforeafterboth

no changes

addedtests/src/setVariableOnChainSchema.test.tsdiffbeforeafterboth

no changes

addedtests/src/substrate/get-balance.tsdiffbeforeafterboth

no changes

addedtests/src/substrate/privateKey.tsdiffbeforeafterboth

no changes

modifiedtests/src/substrate/promisify-substrate.tsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
1import ApiPromise from "@polkadot/api/promise/Api";6import { ApiPromise } from "@polkadot/api";
27
3type PromiseType<T> = T extends PromiseLike<infer TInner> ? TInner : T;8type PromiseType<T> = T extends PromiseLike<infer TInner> ? TInner : T;
49
5export default function promisifySubstrate<T extends (...args: any[]) => any>(api: ApiPromise, action: T): (...args: Parameters<T>) => Promise<PromiseType<ReturnType<T>>> {10export default function promisifySubstrate<T extends (...args: any[]) => any>(api: ApiPromise, action: T): (...args: Parameters<T>) => Promise<PromiseType<ReturnType<T>>> {
6 return (...args: Parameters<T>) => {11 return (...args: Parameters<T>) => {
7 const promise = new Promise<PromiseType<ReturnType<T>>>((resolve, reject) => {12 const promise = new Promise<PromiseType<ReturnType<T>>>((resolve: ((result: PromiseType<ReturnType<T>>) => void) | undefined, reject: ((error: any) => void) | undefined) => {
8 const cleanup = () => {13 const cleanup = () => {
9 api.off('disconnected', fail);14 api.off('disconnected', fail);
10 api.off('error', fail);15 api.off('error', fail);
16 resolve = undefined;
17 reject = undefined;
11 };18 };
1219
13 const success = (r: any) => {20 const success = (r: any) => {
14 cleanup();21 resolve && resolve(r);
15 resolve(r);22 cleanup();
16 };23 };
17 const fail = (error: any) => {24 const fail = (error: any) => {
18 cleanup();25 reject && reject(error);
19 reject(error);26 cleanup();
20 };27 };
21 28
22 api.on('disconnected', fail);29 api.on('disconnected', fail);
modifiedtests/src/substrate/substrate-api.tsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
1import { WsProvider, ApiPromise } from "@polkadot/api";6import { WsProvider, ApiPromise } from "@polkadot/api";
7import { EventRecord } from '@polkadot/types/interfaces/system/types';
8import { ExtrinsicStatus } from '@polkadot/types/interfaces/author/types';
9import { IKeyringPair } from "@polkadot/types/types";
10
2import config from "../config";11import config from "../config";
3import promisifySubstrate from "./promisify-substrate";12import promisifySubstrate from "./promisify-substrate";
4import { ApiOptions } from "@polkadot/api/types";13import { ApiOptions, SubmittableExtrinsic, ApiTypes } from "@polkadot/api/types";
14import rtt from "../../../runtime_types.json";
515
6function defaultApiOptions(): ApiOptions {16function defaultApiOptions(): ApiOptions {
7 const wsProvider = new WsProvider(config.substrateUrl);17 const wsProvider = new WsProvider(config.substrateUrl);
8 return { provider: wsProvider, types: JSON.parse(config.customTypes) };18 return { provider: wsProvider, types: rtt };
9}19}
1020
11export default async function usingApi(action: (api: ApiPromise) => Promise<void>, settings: ApiOptions | undefined = undefined): Promise<void> {21export default async function usingApi<T = void>(action: (api: ApiPromise) => Promise<T>, settings: ApiOptions | undefined = undefined): Promise<T> {
12 settings = settings || defaultApiOptions();22 settings = settings || defaultApiOptions();
13 let api: ApiPromise | undefined = undefined;23 let api: ApiPromise = new ApiPromise(settings);
24 let result: T = null as unknown as T;
25
26 // TODO: Remove, this is temporary: Filter unneeded API output
27 // (Jaco promised it will be removed in the next version)
28 const consoleErr = console.error;
29 console.error = (message: string) => {
30 if (message.includes("StorageChangeSet:: WebSocket is not connected") || message.includes("2021-")) {}
31 else consoleErr(message);
32 };
1433
15 try {34 try {
16 api = new ApiPromise(settings);
17 await promisifySubstrate(api, () => api && api.isReady)();35 await promisifySubstrate(api, async () => {
18 await action(api);36 if (api) {
37 await api.isReadyOrError;
38 result = await action(api);
39 }
40 })();
19 } finally {41 } finally {
20 api && api.disconnect();42 await api.disconnect();
43 console.error = consoleErr;
21 }44 }
45 return result as T;
22}46}
47
48enum TransactionStatus {
49 Success,
50 Fail,
51 NotReady
52}
53
54function getTransactionStatus(events: EventRecord[], status: ExtrinsicStatus): TransactionStatus {
55 if (status.isReady) {
56 return TransactionStatus.NotReady;
57 }
58 if (status.isBroadcast) {
59 return TransactionStatus.NotReady;
60 }
61 if (status.isInBlock || status.isFinalized) {
62 if(events.filter(e => e.event.data.method === 'ExtrinsicFailed').length > 0) {
63 return TransactionStatus.Fail;
64 }
65 if(events.filter(e => e.event.data.method === 'ExtrinsicSuccess').length > 0) {
66 return TransactionStatus.Success;
67 }
68 }
69
70 return TransactionStatus.Fail;
71}
72
73export function
74submitTransactionAsync(sender: IKeyringPair, transaction: SubmittableExtrinsic<ApiTypes>): Promise<EventRecord[]> {
75 return new Promise(async (resolve, reject) => {
76 try {
77 await transaction.signAndSend(sender, ({ events = [], status }) => {
78 const transactionStatus = getTransactionStatus(events, status);
79
80 if (transactionStatus === TransactionStatus.Success) {
81 resolve(events);
82 } else if (transactionStatus === TransactionStatus.Fail) {
83 console.log(`Something went wrong with transaction. Status: ${status}`);
84 reject(events);
85 }
86 });
87 } catch (e) {
88 console.log('Error: ', e);
89 reject(e);
90 }
91 });
92}
93
94export function submitTransactionExpectFailAsync(sender: IKeyringPair, transaction: SubmittableExtrinsic<ApiTypes>): Promise<EventRecord[]> {
95 const consoleError = console.error;
96 const consoleLog = console.log;
97 console.error = () => {};
98 console.log = () => {};
99
100 return new Promise<EventRecord[]>(async function(res, rej) {
101 const resolve = (rec: EventRecord[]) => {
102 setTimeout(() => {
103 res(rec);
104 console.error = consoleError;
105 console.log = consoleLog;
106 });
107 };
108 const reject = (errror: any) => {
109 setTimeout(() => {
110 rej(errror);
111 console.error = consoleError;
112 console.log = consoleLog;
113 });
114 };
115 try {
116 await transaction.signAndSend(sender, ({ events = [], status }) => {
117 const transactionStatus = getTransactionStatus(events, status);
118
119 // console.log('transactionStatus', transactionStatus, 'events', events);
120
121 if (transactionStatus === TransactionStatus.Success) {
122 resolve(events);
123 } else if (transactionStatus === TransactionStatus.Fail) {
124 reject(events);
125 }
126 });
127 } catch (e) {
128 reject(e);
129 }
130 });
131}
132
modifiedtests/src/substrate/wait-new-blocks.tsdiffbeforeafterboth
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
1import { ApiPromise } from "@polkadot/api";6import { ApiPromise } from "@polkadot/api";
27
addedtests/src/toggleContractWhiteList.test.tsdiffbeforeafterboth

no changes

addedtests/src/transfer.nload.tsdiffbeforeafterboth

no changes

modifiedtests/src/transfer.test.tsdiffbeforeafterboth
1import createSubstrateApi from "./substrate/substrate-api";1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
2import { Keyring, ApiPromise } from "@polkadot/api";6import { ApiPromise } from '@polkadot/api';
3import {AccountInfo} from "@polkadot/types/interfaces/system";7import { IKeyringPair } from '@polkadot/types/types';
4import { expect } from "chai";8import { expect } from 'chai';
5import usingApi from "./substrate/substrate-api";9import { alicesPublicKey, bobsPublicKey } from './accounts';
6import promisifySubstrate from "./substrate/promisify-substrate";10import getBalance from './substrate/get-balance';
7import waitNewBlocks from "./substrate/wait-new-blocks";11import privateKey from './substrate/privateKey';
812import { default as usingApi, submitTransactionAsync } from './substrate/substrate-api';
9async function getBalance(api: ApiPromise, accounts: string[]): Promise<bigint[]> {13import {
14 burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess,
15 destroyCollectionExpectSuccess,
16 findUnusedAddress,
17 getCreateCollectionResult,
18 getCreateItemResult,
19 transferExpectFail,
20 transferExpectSuccess,
21} from './util/helpers';
22
10 const balance = promisifySubstrate(api, (accounts: string[]) => api.query.system.account.multi(accounts));23let Alice: IKeyringPair;
11 const responce = await balance(accounts) as unknown as AccountInfo[];24let Bob: IKeyringPair;
12 return responce.map(r => r.data.free.toBigInt().valueOf());25let Charlie: IKeyringPair;
13}
1426
15describe('Transfer', () => {27describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {
16 it('Balance transfers', async () => {28 it('Balance transfers and check balance', async () => {
17 const bobsPublicKey = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
18 const alicesPublicKey = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
19 await usingApi(async api => {29 await usingApi(async (api: ApiPromise) => {
20 const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);30 const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);
2131
22 const keyring = new Keyring({ type: 'sr25519' });
23
24 const alicePrivateKey = keyring.addFromUri('//Alice');32 const alicePrivateKey = privateKey('//Alice');
25 33
26 const transfer = api.tx.balances.transfer(bobsPublicKey, 1n);34 const transfer = api.tx.balances.transfer(bobsPublicKey, 1n);
27
28 const hash = await transfer.signAndSend(alicePrivateKey);35 const events = await submitTransactionAsync(alicePrivateKey, transfer);
29
30 await waitNewBlocks(api);36 const result = getCreateItemResult(events);
31 37 // tslint:disable-next-line:no-unused-expression
38 expect(result.success).to.be.true;
39
32 const [alicesBalanceAfter, bobsBalanceAfter] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);40 const [alicesBalanceAfter, bobsBalanceAfter] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);
3341
42 // tslint:disable-next-line:no-unused-expression
34 expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true;43 expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true;
44 // tslint:disable-next-line:no-unused-expression
35 expect(bobsBalanceAfter > bobsBalanceBefore).to.be.true;45 expect(bobsBalanceAfter > bobsBalanceBefore).to.be.true;
36 });46 });
37 });47 });
48
49 it('Inability to pay fees error message is correct', async () => {
50 await usingApi(async (api) => {
51 // Find unused address
52 const pk = await findUnusedAddress(api);
53
54 const badTransfer = api.tx.balances.transfer(bobsPublicKey, 1n);
55 // const events = await submitTransactionAsync(pk, badTransfer);
56 const badTransaction = async () => {
57 const events = await submitTransactionAsync(pk, badTransfer);
58 const result = getCreateCollectionResult(events);
59 // tslint:disable-next-line:no-unused-expression
60 expect(result.success).to.be.false;
61 };
62 expect(badTransaction()).to.be.rejectedWith('Inability to pay some fees , e.g. account balance too low');
63 });
64 });
65
66 it('User can transfer owned token', async () => {
67 await usingApi(async (api) => {
68 const Alice = privateKey('//Alice');
69 const Bob = privateKey('//Bob');
70 // nft
71 const nftCollectionId = await createCollectionExpectSuccess();
72 const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');
73 await transferExpectSuccess(nftCollectionId, newNftTokenId, Alice, Bob, 1, 'NFT');
74 // fungible
75 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
76 const newFungibleTokenId = await createItemExpectSuccess(Alice, fungibleCollectionId, 'Fungible');
77 await transferExpectSuccess(fungibleCollectionId, newFungibleTokenId, Alice, Bob, 1, 'Fungible');
78 // reFungible
79 const reFungibleCollectionId = await
80 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
81 const newReFungibleTokenId = await createItemExpectSuccess(Alice, reFungibleCollectionId, 'ReFungible');
82 await transferExpectSuccess(reFungibleCollectionId,
83 newReFungibleTokenId, Alice, Bob, 100, 'ReFungible');
84 });
85 });
38});86});
87
88describe('Negative Integration Test Transfer(recipient, collection_id, item_id, value)', () => {
89 before(async () => {
90 await usingApi(async (api: ApiPromise) => {
91 Alice = privateKey('//Alice');
92 Bob = privateKey('//Bob');
93 Charlie = privateKey('//Charlie');
94 });
95 });
96 it('Transfer with not existed collection_id', async () => {
97 await usingApi(async (api) => {
98 // nft
99 const nftCollectionCount = await api.query.nft.createdCollectionCount() as unknown as number;
100 await transferExpectFail(nftCollectionCount + 1, 1, Alice, Bob, 1);
101 // fungible
102 const fungibleCollectionCount = await api.query.nft.createdCollectionCount() as unknown as number;
103 await transferExpectFail(fungibleCollectionCount + 1, 1, Alice, Bob, 1);
104 // reFungible
105 const reFungibleCollectionCount = await api.query.nft.createdCollectionCount() as unknown as number;
106 await transferExpectFail(reFungibleCollectionCount + 1, 1, Alice, Bob, 1);
107 });
108 });
109 it('Transfer with deleted collection_id', async () => {
110 // nft
111 const nftCollectionId = await createCollectionExpectSuccess();
112 const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');
113 await destroyCollectionExpectSuccess(nftCollectionId);
114 await transferExpectFail(nftCollectionId, newNftTokenId, Alice, Bob, 1, 'NFT');
115 // fungible
116 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
117 const newFungibleTokenId = await createItemExpectSuccess(Alice, fungibleCollectionId, 'Fungible');
118 await destroyCollectionExpectSuccess(fungibleCollectionId);
119 await transferExpectFail(fungibleCollectionId, newFungibleTokenId, Alice, Bob, 1, 'Fungible');
120 // reFungible
121 const reFungibleCollectionId = await
122 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
123 const newReFungibleTokenId = await createItemExpectSuccess(Alice, reFungibleCollectionId, 'ReFungible');
124 await destroyCollectionExpectSuccess(reFungibleCollectionId);
125 await transferExpectFail(reFungibleCollectionId,
126 newReFungibleTokenId, Alice, Bob, 1, 'ReFungible');
127 });
128 it('Transfer with not existed item_id', async () => {
129 // nft
130 const nftCollectionId = await createCollectionExpectSuccess();
131 await transferExpectFail(nftCollectionId, 2, Alice, Bob, 1, 'NFT');
132 // fungible
133 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
134 await transferExpectFail(fungibleCollectionId, 2, Alice, Bob, 1, 'Fungible');
135 // reFungible
136 const reFungibleCollectionId = await
137 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
138 await transferExpectFail(reFungibleCollectionId,
139 2, Alice, Bob, 1, 'ReFungible');
140 });
141 it('Transfer with deleted item_id', async () => {
142 // nft
143 const nftCollectionId = await createCollectionExpectSuccess();
144 const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');
145 await burnItemExpectSuccess(Alice, nftCollectionId, newNftTokenId, 1);
146 await transferExpectFail(nftCollectionId, newNftTokenId, Alice, Bob, 1, 'NFT');
147 // fungible
148 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
149 const newFungibleTokenId = await createItemExpectSuccess(Alice, fungibleCollectionId, 'Fungible');
150 await burnItemExpectSuccess(Alice, fungibleCollectionId, newFungibleTokenId, 10);
151 await transferExpectFail(fungibleCollectionId, newFungibleTokenId, Alice, Bob, 1, 'Fungible');
152 // reFungible
153 const reFungibleCollectionId = await
154 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
155 const newReFungibleTokenId = await createItemExpectSuccess(Alice, reFungibleCollectionId, 'ReFungible');
156 await burnItemExpectSuccess(Alice, reFungibleCollectionId, newReFungibleTokenId, 1);
157 await transferExpectFail(reFungibleCollectionId,
158 newReFungibleTokenId, Alice, Bob, 1, 'ReFungible');
159 });
160 it('Transfer with recipient that is not owner', async () => {
161 // nft
162 const nftCollectionId = await createCollectionExpectSuccess();
163 const newNftTokenId = await createItemExpectSuccess(Alice, nftCollectionId, 'NFT');
164 await transferExpectFail(nftCollectionId, newNftTokenId, Charlie, Bob, 1, 'NFT');
165 // fungible
166 const fungibleCollectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
167 const newFungibleTokenId = await createItemExpectSuccess(Alice, fungibleCollectionId, 'Fungible');
168 await transferExpectFail(fungibleCollectionId, newFungibleTokenId, Charlie, Bob, 1, 'Fungible');
169 // reFungible
170 const reFungibleCollectionId = await
171 createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
172 const newReFungibleTokenId = await createItemExpectSuccess(Alice, reFungibleCollectionId, 'ReFungible');
173 await transferExpectFail(reFungibleCollectionId,
174 newReFungibleTokenId, Charlie, Bob, 1, 'ReFungible');
175 });
176});
39177
addedtests/src/transferFrom.test.tsdiffbeforeafterboth

no changes

addedtests/src/transfer_contract/metadata.jsondiffbeforeafterboth

no changes

addedtests/src/transfer_contract/nft_transfer.wasmdiffbeforeafterboth

binary blob — no preview

addedtests/src/types.tsdiffbeforeafterboth

no changes

addedtests/src/util/contracthelpers.tsdiffbeforeafterboth

no changes

addedtests/src/util/helpers.tsdiffbeforeafterboth

no changes

addedtests/src/util/util.tsdiffbeforeafterboth

no changes

addedtests/yarn.lockdiffbeforeafterboth

no changes