git.delta.rocks / unique-network / refs/commits / 5ecbc869df92

difftreelog

Merge branch 'develop' into feature/NFTPAR-96

sotmorskiy2020-11-26parents: #31f6053 #eaea941.patch.diff
in: master
# Conflicts:
#	pallets/nft/src/lib.rs
#	pallets/nft/src/tests.rs

34 files changed

modified.dockerignorediffbeforeafterboth
3doc/3doc/
4target/4target/
5chain-data*/5chain-data*/
6smart_contract/6smart_contract/
7
modifiedCargo.lockdiffbeforeafterboth
16source = "registry+https://github.com/rust-lang/crates.io-index"16source = "registry+https://github.com/rust-lang/crates.io-index"
17checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072"17checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072"
18dependencies = [18dependencies = [
19 "gimli",19 "gimli 0.22.0",
20]20]
2121
22[[package]]22[[package]]
25source = "registry+https://github.com/rust-lang/crates.io-index"25source = "registry+https://github.com/rust-lang/crates.io-index"
26checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"26checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
27
28[[package]]
29name = "adler32"
30version = "1.1.0"
31source = "registry+https://github.com/rust-lang/crates.io-index"
32checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d"
3327
34[[package]]28[[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.3.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 1.3.4",
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.2.19"
91source = "registry+https://github.com/rust-lang/crates.io-index"85source = "registry+https://github.com/rust-lang/crates.io-index"
92checksum = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3"86checksum = "29661b60bec623f0586702976ff4d0c9942dcb6723161c2df0eea78455cfedfb"
93dependencies = [87dependencies = [
94 "const-random",88 "const-random",
95]89]
90
91[[package]]
92name = "ahash"
93version = "0.3.8"
94source = "registry+https://github.com/rust-lang/crates.io-index"
95checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217"
9696
97[[package]]97[[package]]
98name = "aho-corasick"98name = "aho-corasick"
99version = "0.7.13"99version = "0.7.14"
100source = "registry+https://github.com/rust-lang/crates.io-index"100source = "registry+https://github.com/rust-lang/crates.io-index"
101checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86"101checksum = "b476ce7103678b0c6d3d395dbbae31d48ff910bd28be979ba5d48c6351131d0d"
102dependencies = [102dependencies = [
103 "memchr",103 "memchr",
104]104]
111dependencies = [111dependencies = [
112 "approx",112 "approx",
113 "num-complex",113 "num-complex",
114 "num-traits 0.2.12",114 "num-traits",
115]115]
116116
117[[package]]117[[package]]
134134
135[[package]]135[[package]]
136name = "anyhow"136name = "anyhow"
137version = "1.0.31"137version = "1.0.33"
138source = "registry+https://github.com/rust-lang/crates.io-index"138source = "registry+https://github.com/rust-lang/crates.io-index"
139checksum = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f"139checksum = "a1fd36ffbb1fb7c834eac128ea8d0e310c5aeb635548f9d58861e1308d46e71c"
140140
141[[package]]141[[package]]
142name = "approx"142name = "approx"
143version = "0.3.2"143version = "0.3.2"
144source = "registry+https://github.com/rust-lang/crates.io-index"144source = "registry+https://github.com/rust-lang/crates.io-index"
145checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3"145checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3"
146dependencies = [146dependencies = [
147 "num-traits 0.2.12",147 "num-traits",
148]148]
149149
150[[package]]150[[package]]
189source = "registry+https://github.com/rust-lang/crates.io-index"189source = "registry+https://github.com/rust-lang/crates.io-index"
190checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502"190checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502"
191dependencies = [191dependencies = [
192 "quote 1.0.7",192 "quote",
193 "syn 1.0.34",193 "syn",
194]194]
195
196[[package]]
197name = "async-channel"
198version = "1.5.1"
199source = "registry+https://github.com/rust-lang/crates.io-index"
200checksum = "59740d83946db6a5af71ae25ddf9562c2b176b2ca42cf99a455f09f4a220d6b9"
201dependencies = [
202 "concurrent-queue",
203 "event-listener",
204 "futures-core",
205]
195206
196[[package]]207[[package]]
197name = "assert_matches"208name = "async-executor"
198version = "1.3.0"209version = "1.3.0"
199source = "registry+https://github.com/rust-lang/crates.io-index"210source = "registry+https://github.com/rust-lang/crates.io-index"
200checksum = "7deb0a829ca7bcfaf5da70b073a8d128619259a7be8216a355e23f00763059e5"211checksum = "d373d78ded7d0b3fa8039375718cde0aace493f2e34fb60f51cbf567562ca801"
212dependencies = [
213 "async-task",
214 "concurrent-queue",
215 "fastrand",
216 "futures-lite",
217 "once_cell 1.4.1",
218 "vec-arena",
219]
220
221[[package]]
222name = "async-global-executor"
223version = "1.4.0"
224source = "registry+https://github.com/rust-lang/crates.io-index"
225checksum = "0659b83a146398616883aa5199cdd1b055ec088a83c9a338eab3534f33f0622e"
226dependencies = [
227 "async-executor",
228 "async-io",
229 "futures-lite",
230 "num_cpus",
231 "once_cell 1.4.1",
232]
233
234[[package]]
235name = "async-io"
236version = "1.1.10"
237source = "registry+https://github.com/rust-lang/crates.io-index"
238checksum = "d54bc4c1c7292475efb2253227dbcfad8fe1ca4c02bc62c510cc2f3da5c4704e"
239dependencies = [
240 "concurrent-queue",
241 "fastrand",
242 "futures-lite",
243 "libc",
244 "log",
245 "nb-connect",
246 "once_cell 1.4.1",
247 "parking",
248 "polling",
249 "vec-arena",
250 "waker-fn",
251 "winapi 0.3.9",
252]
253
254[[package]]
255name = "async-mutex"
256version = "1.4.0"
257source = "registry+https://github.com/rust-lang/crates.io-index"
258checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e"
259dependencies = [
260 "event-listener",
261]
201262
202[[package]]263[[package]]
203name = "async-std"264name = "async-std"
204version = "1.5.0"265version = "1.6.5"
205source = "registry+https://github.com/rust-lang/crates.io-index"266source = "registry+https://github.com/rust-lang/crates.io-index"
206checksum = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267"267checksum = "a9fa76751505e8df1c7a77762f60486f60c71bbd9b8557f4da6ad47d083732ed"
207dependencies = [268dependencies = [
208 "async-task",269 "async-global-executor",
209 "broadcaster",270 "async-io",
210 "crossbeam-channel",271 "async-mutex",
211 "crossbeam-deque",272 "blocking",
212 "crossbeam-utils",273 "crossbeam-utils",
274 "futures-channel",
213 "futures-core",275 "futures-core",
214 "futures-io",276 "futures-io",
215 "futures-timer 2.0.2",277 "futures-lite",
278 "gloo-timers",
216 "kv-log-macro",279 "kv-log-macro",
217 "log",280 "log",
218 "memchr",281 "memchr",
219 "mio",
220 "mio-uds",
221 "num_cpus",282 "num_cpus",
222 "once_cell",283 "once_cell 1.4.1",
223 "pin-project-lite",284 "pin-project-lite",
224 "pin-utils",285 "pin-utils",
225 "slab",286 "slab",
287 "wasm-bindgen-futures",
226]288]
227289
228[[package]]290[[package]]
229name = "async-task"291name = "async-task"
230version = "1.3.1"292version = "4.0.2"
231source = "registry+https://github.com/rust-lang/crates.io-index"293source = "registry+https://github.com/rust-lang/crates.io-index"
232checksum = "0ac2c016b079e771204030951c366db398864f5026f84a44dafb0ff20f02085d"294checksum = "8ab27c1aa62945039e44edaeee1dc23c74cc0c303dd5fe0fb462a184f1c3a518"
233dependencies = [
234 "libc",
235 "winapi 0.3.9",
236]
237295
238[[package]]296[[package]]
239name = "async-tls"297name = "async-tls"
240version = "0.7.0"298version = "0.8.0"
241source = "registry+https://github.com/rust-lang/crates.io-index"299source = "registry+https://github.com/rust-lang/crates.io-index"
242checksum = "95fd83426b89b034bf4e9ceb9c533c2f2386b813fd3dcae0a425ec6f1837d78a"300checksum = "df097e3f506bec0e1a24f06bb3c962c228f36671de841ff579cb99f371772634"
243dependencies = [301dependencies = [
244 "futures 0.3.5",302 "futures 0.3.6",
245 "rustls",303 "rustls",
246 "webpki",304 "webpki",
247 "webpki-roots 0.19.0",305 "webpki-roots 0.19.0",
248]306]
307
308[[package]]
309name = "async-trait"
310version = "0.1.41"
311source = "registry+https://github.com/rust-lang/crates.io-index"
312checksum = "b246867b8b3b6ae56035f1eb1ed557c1d8eae97f0d53696138a50fa0e3a3b8c0"
313dependencies = [
314 "proc-macro2",
315 "quote",
316 "syn",
317]
318
319[[package]]
320name = "atomic"
321version = "0.4.6"
322source = "registry+https://github.com/rust-lang/crates.io-index"
323checksum = "64f46ca51dca4837f1520754d1c8c36636356b81553d928dc9c177025369a06e"
324
325[[package]]
326name = "atomic-waker"
327version = "1.0.0"
328source = "registry+https://github.com/rust-lang/crates.io-index"
329checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a"
249330
250[[package]]331[[package]]
251name = "atty"332name = "atty"
266347
267[[package]]348[[package]]
268name = "autocfg"349name = "autocfg"
269version = "1.0.0"350version = "1.0.1"
270source = "registry+https://github.com/rust-lang/crates.io-index"351source = "registry+https://github.com/rust-lang/crates.io-index"
271checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"352checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
272353
273[[package]]354[[package]]
274name = "backtrace"355name = "backtrace"
275version = "0.3.50"356version = "0.3.53"
276source = "registry+https://github.com/rust-lang/crates.io-index"357source = "registry+https://github.com/rust-lang/crates.io-index"
277checksum = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293"358checksum = "707b586e0e2f247cbde68cdd2c3ce69ea7b7be43e1c5b426e37c9319c4b9838e"
278dependencies = [359dependencies = [
279 "addr2line",360 "addr2line",
280 "cfg-if",361 "cfg-if 1.0.0",
281 "libc",362 "libc",
282 "miniz_oxide",363 "miniz_oxide",
283 "object",364 "object 0.21.1",
284 "rustc-demangle",365 "rustc-demangle",
285]366]
286367
296source = "registry+https://github.com/rust-lang/crates.io-index"377source = "registry+https://github.com/rust-lang/crates.io-index"
297checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"378checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
379
380[[package]]
381name = "base64"
382version = "0.12.3"
383source = "registry+https://github.com/rust-lang/crates.io-index"
384checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
385
386[[package]]
387name = "bincode"
388version = "1.3.1"
389source = "registry+https://github.com/rust-lang/crates.io-index"
390checksum = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d"
391dependencies = [
392 "byteorder 1.3.4",
393 "serde",
394]
298395
299[[package]]396[[package]]
300name = "bindgen"397name = "bindgen"
301version = "0.53.3"398version = "0.54.0"
302source = "registry+https://github.com/rust-lang/crates.io-index"399source = "registry+https://github.com/rust-lang/crates.io-index"
303checksum = "c72a978d268b1d70b0e963217e60fdabd9523a941457a6c42a7315d15c7e89e5"400checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36"
304dependencies = [401dependencies = [
305 "bitflags",402 "bitflags",
306 "cexpr",403 "cexpr",
307 "cfg-if",404 "cfg-if 0.1.10",
308 "clang-sys",405 "clang-sys",
309 "clap",406 "clap",
310 "env_logger",407 "env_logger",
313 "log",410 "log",
314 "peeking_take_while",411 "peeking_take_while",
315 "proc-macro2",412 "proc-macro2",
316 "quote 1.0.7",413 "quote",
317 "regex",414 "regex",
318 "rustc-hash",415 "rustc-hash",
319 "shlex",416 "shlex",
320 "which",417 "which",
321]418]
419
420[[package]]
421name = "bip39"
422version = "0.6.0-beta.1"
423source = "registry+https://github.com/rust-lang/crates.io-index"
424checksum = "7059804e226b3ac116519a252d7f5fb985a5ccc0e93255e036a5f7e7283323f4"
425dependencies = [
426 "failure",
427 "hashbrown 0.1.8",
428 "hmac",
429 "once_cell 0.1.8",
430 "pbkdf2",
431 "rand 0.6.5",
432 "sha2 0.8.2",
433]
322434
323[[package]]435[[package]]
324name = "bitflags"436name = "bitflags"
342 "radium",454 "radium",
343]455]
344
345[[package]]
346name = "blake2"
347version = "0.8.1"
348source = "registry+https://github.com/rust-lang/crates.io-index"
349checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330"
350dependencies = [
351 "byte-tools",
352 "crypto-mac 0.7.0",
353 "digest 0.8.1",
354 "opaque-debug 0.2.3",
355]
356456
357[[package]]457[[package]]
358name = "blake2"458name = "blake2"
361checksum = "84ce5b6108f8e154604bd4eb76a2f726066c3464d5a552a4229262a18c9bb471"461checksum = "84ce5b6108f8e154604bd4eb76a2f726066c3464d5a552a4229262a18c9bb471"
362dependencies = [462dependencies = [
363 "byte-tools",463 "byte-tools",
364 "byteorder",464 "byteorder 1.3.4",
365 "crypto-mac 0.8.0",465 "crypto-mac 0.8.0",
366 "digest 0.9.0",466 "digest 0.9.0",
367 "opaque-debug 0.2.3",467 "opaque-debug 0.2.3",
405source = "registry+https://github.com/rust-lang/crates.io-index"505source = "registry+https://github.com/rust-lang/crates.io-index"
406checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"506checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
407dependencies = [507dependencies = [
408 "block-padding",508 "block-padding 0.1.5",
409 "byte-tools",509 "byte-tools",
410 "byteorder",510 "byteorder 1.3.4",
411 "generic-array 0.12.3",511 "generic-array 0.12.3",
412]512]
413513
417source = "registry+https://github.com/rust-lang/crates.io-index"517source = "registry+https://github.com/rust-lang/crates.io-index"
418checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"518checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
419dependencies = [519dependencies = [
520 "block-padding 0.2.1",
420 "generic-array 0.14.3",521 "generic-array 0.14.4",
421]522]
422523
423[[package]]524[[package]]
424name = "block-cipher"525name = "block-cipher"
425version = "0.7.1"526version = "0.8.0"
426source = "registry+https://github.com/rust-lang/crates.io-index"527source = "registry+https://github.com/rust-lang/crates.io-index"
427checksum = "fa136449e765dc7faa244561ccae839c394048667929af599b5d931ebe7b7f10"528checksum = "f337a3e6da609650eb74e02bc9fac7b735049f7623ab12f2e4c719316fcc7e80"
428dependencies = [529dependencies = [
429 "generic-array 0.14.3",530 "generic-array 0.14.4",
430]531]
431532
432[[package]]533[[package]]
438 "byte-tools",539 "byte-tools",
439]540]
541
542[[package]]
543name = "block-padding"
544version = "0.2.1"
545source = "registry+https://github.com/rust-lang/crates.io-index"
546checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
440547
441[[package]]548[[package]]
442name = "broadcaster"549name = "blocking"
443version = "1.0.0"550version = "1.0.2"
444source = "registry+https://github.com/rust-lang/crates.io-index"551source = "registry+https://github.com/rust-lang/crates.io-index"
445checksum = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87"552checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9"
446dependencies = [553dependencies = [
447 "futures-channel",554 "async-channel",
448 "futures-core",555 "async-task",
449 "futures-sink",556 "atomic-waker",
450 "futures-util",557 "fastrand",
451 "parking_lot 0.10.2",558 "futures-lite",
452 "slab",559 "once_cell 1.4.1",
453]560]
454561
455[[package]]562[[package]]
485source = "registry+https://github.com/rust-lang/crates.io-index"592source = "registry+https://github.com/rust-lang/crates.io-index"
486checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"593checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
594
595[[package]]
596name = "byteorder"
597version = "0.5.3"
598source = "registry+https://github.com/rust-lang/crates.io-index"
599checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855"
487600
488[[package]]601[[package]]
489name = "byteorder"602name = "byteorder"
497source = "registry+https://github.com/rust-lang/crates.io-index"610source = "registry+https://github.com/rust-lang/crates.io-index"
498checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"611checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
499dependencies = [612dependencies = [
500 "byteorder",613 "byteorder 1.3.4",
501 "either",614 "either",
502 "iovec",615 "iovec",
503]616]
514source = "registry+https://github.com/rust-lang/crates.io-index"627source = "registry+https://github.com/rust-lang/crates.io-index"
515checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b"628checksum = "4964518bd3b4a8190e832886cdc0da9794f12e8e6c1613a9e90ff331c4c8724b"
629
630[[package]]
631name = "cache-padded"
632version = "1.1.1"
633source = "registry+https://github.com/rust-lang/crates.io-index"
634checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
516635
517[[package]]636[[package]]
518name = "cc"637name = "cc"
519version = "1.0.58"638version = "1.0.61"
520source = "registry+https://github.com/rust-lang/crates.io-index"639source = "registry+https://github.com/rust-lang/crates.io-index"
521checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518"640checksum = "ed67cbde08356238e75fc4656be4749481eeffb09e19f320a25237d5221c985d"
522dependencies = [641dependencies = [
523 "jobserver",642 "jobserver",
524]643]
538source = "registry+https://github.com/rust-lang/crates.io-index"657source = "registry+https://github.com/rust-lang/crates.io-index"
539checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"658checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
659
660[[package]]
661name = "cfg-if"
662version = "1.0.0"
663source = "registry+https://github.com/rust-lang/crates.io-index"
664checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
540665
541[[package]]666[[package]]
542name = "chacha20"667name = "chacha20"
543version = "0.4.3"668version = "0.5.0"
544source = "registry+https://github.com/rust-lang/crates.io-index"669source = "registry+https://github.com/rust-lang/crates.io-index"
545checksum = "086c0f07ac275808b7bf9a39f2fd013aae1498be83632814c8c4e0bd53f2dc58"670checksum = "244fbce0d47e97e8ef2f63b81d5e05882cb518c68531eb33194990d7b7e85845"
546dependencies = [671dependencies = [
547 "stream-cipher",672 "stream-cipher 0.7.1",
548 "zeroize",673 "zeroize",
549]674]
550675
551[[package]]676[[package]]
552name = "chacha20poly1305"677name = "chacha20poly1305"
553version = "0.5.1"678version = "0.6.0"
554source = "registry+https://github.com/rust-lang/crates.io-index"679source = "registry+https://github.com/rust-lang/crates.io-index"
555checksum = "18b0c90556d8e3fec7cf18d84a2f53d27b21288f2fe481b830fadcf809e48205"680checksum = "9bf18d374d66df0c05cdddd528a7db98f78c28e2519b120855c4f84c5027b1f5"
556dependencies = [681dependencies = [
557 "aead",682 "aead",
558 "chacha20",683 "chacha20",
559 "poly1305",684 "poly1305",
560 "stream-cipher",685 "stream-cipher 0.7.1",
561 "zeroize",686 "zeroize",
562]687]
563688
564[[package]]689[[package]]
565name = "chrono"690name = "chrono"
566version = "0.4.13"691version = "0.4.19"
567source = "registry+https://github.com/rust-lang/crates.io-index"692source = "registry+https://github.com/rust-lang/crates.io-index"
568checksum = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6"693checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
569dependencies = [694dependencies = [
695 "libc",
570 "num-integer",696 "num-integer",
571 "num-traits 0.2.12",697 "num-traits",
572 "time",698 "time",
699 "winapi 0.3.9",
573]700]
574701
575[[package]]702[[package]]
585712
586[[package]]713[[package]]
587name = "clap"714name = "clap"
588version = "2.33.1"715version = "2.33.3"
589source = "registry+https://github.com/rust-lang/crates.io-index"716source = "registry+https://github.com/rust-lang/crates.io-index"
590checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"717checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
591dependencies = [718dependencies = [
592 "ansi_term 0.11.0",719 "ansi_term 0.11.0",
593 "atty",720 "atty",
598 "vec_map",725 "vec_map",
599]726]
600
601[[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]
609727
610[[package]]728[[package]]
611name = "cloudabi"729name = "cloudabi"
616 "bitflags",734 "bitflags",
617]735]
736
737[[package]]
738name = "cloudabi"
739version = "0.1.0"
740source = "registry+https://github.com/rust-lang/crates.io-index"
741checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467"
742dependencies = [
743 "bitflags",
744]
745
746[[package]]
747name = "concurrent-queue"
748version = "1.2.2"
749source = "registry+https://github.com/rust-lang/crates.io-index"
750checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3"
751dependencies = [
752 "cache-padded",
753]
618754
619[[package]]755[[package]]
620name = "const-random"756name = "const-random"
621version = "0.1.8"757version = "0.1.11"
622source = "registry+https://github.com/rust-lang/crates.io-index"758source = "registry+https://github.com/rust-lang/crates.io-index"
623checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a"759checksum = "02dc82c12dc2ee6e1ded861cf7d582b46f66f796d1b6c93fa28b911ead95da02"
624dependencies = [760dependencies = [
625 "const-random-macro",761 "const-random-macro",
626 "proc-macro-hack",762 "proc-macro-hack",
627]763]
628764
629[[package]]765[[package]]
630name = "const-random-macro"766name = "const-random-macro"
631version = "0.1.8"767version = "0.1.11"
632source = "registry+https://github.com/rust-lang/crates.io-index"768source = "registry+https://github.com/rust-lang/crates.io-index"
633checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a"769checksum = "fc757bbb9544aa296c2ae00c679e81f886b37e28e59097defe0cf524306f6685"
634dependencies = [770dependencies = [
635 "getrandom",771 "getrandom 0.2.0",
636 "proc-macro-hack",772 "proc-macro-hack",
637]773]
638774
664source = "registry+https://github.com/rust-lang/crates.io-index"800source = "registry+https://github.com/rust-lang/crates.io-index"
665checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"801checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"
802
803[[package]]
804name = "cranelift-bforest"
805version = "0.66.0"
806source = "registry+https://github.com/rust-lang/crates.io-index"
807checksum = "8dcc286b052ee24a1e5a222e7c1125e6010ad35b0f248709b9b3737a8fedcfdf"
808dependencies = [
809 "cranelift-entity",
810]
811
812[[package]]
813name = "cranelift-codegen"
814version = "0.66.0"
815source = "registry+https://github.com/rust-lang/crates.io-index"
816checksum = "9d9badfe36176cb653506091693bc2bb1970c9bddfcd6ec7fac404f7eaec6f38"
817dependencies = [
818 "byteorder 1.3.4",
819 "cranelift-bforest",
820 "cranelift-codegen-meta",
821 "cranelift-codegen-shared",
822 "cranelift-entity",
823 "gimli 0.21.0",
824 "log",
825 "regalloc",
826 "serde",
827 "smallvec 1.4.2",
828 "target-lexicon",
829 "thiserror",
830]
831
832[[package]]
833name = "cranelift-codegen-meta"
834version = "0.66.0"
835source = "registry+https://github.com/rust-lang/crates.io-index"
836checksum = "3c3f460031861e4f4ad510be62b2ae50bba6cc886b598a36f9c0a970feab9598"
837dependencies = [
838 "cranelift-codegen-shared",
839 "cranelift-entity",
840]
841
842[[package]]
843name = "cranelift-codegen-shared"
844version = "0.66.0"
845source = "registry+https://github.com/rust-lang/crates.io-index"
846checksum = "76ad12409e922e7697cd0bdc7dc26992f64a77c31880dfe5e3c7722f4710206d"
847
848[[package]]
849name = "cranelift-entity"
850version = "0.66.0"
851source = "registry+https://github.com/rust-lang/crates.io-index"
852checksum = "d97cdc58972ea065d107872cfb9079f4c92ade78a8af85aaff519a65b5d13f71"
853dependencies = [
854 "serde",
855]
856
857[[package]]
858name = "cranelift-frontend"
859version = "0.66.0"
860source = "registry+https://github.com/rust-lang/crates.io-index"
861checksum = "2ef419efb4f94ecc02e5d9fbcc910d2bb7f0040e2de570e63a454f883bc891d6"
862dependencies = [
863 "cranelift-codegen",
864 "log",
865 "smallvec 1.4.2",
866 "target-lexicon",
867]
868
869[[package]]
870name = "cranelift-native"
871version = "0.66.0"
872source = "registry+https://github.com/rust-lang/crates.io-index"
873checksum = "6e69d44d59826eef6794066ac2c0f4ad3975f02d97030c60dbc04e3886adf36e"
874dependencies = [
875 "cranelift-codegen",
876 "raw-cpuid",
877 "target-lexicon",
878]
879
880[[package]]
881name = "cranelift-wasm"
882version = "0.66.0"
883source = "registry+https://github.com/rust-lang/crates.io-index"
884checksum = "979df666b1304624abe99738e9e0e7c7479ee5523ba4b8b237df9ff49996acbb"
885dependencies = [
886 "cranelift-codegen",
887 "cranelift-entity",
888 "cranelift-frontend",
889 "log",
890 "serde",
891 "thiserror",
892 "wasmparser 0.59.0",
893]
666894
667[[package]]895[[package]]
668name = "crc32fast"896name = "crc32fast"
669version = "1.2.0"897version = "1.2.0"
670source = "registry+https://github.com/rust-lang/crates.io-index"898source = "registry+https://github.com/rust-lang/crates.io-index"
671checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"899checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
672dependencies = [900dependencies = [
673 "cfg-if",901 "cfg-if 0.1.10",
674]902]
675903
676[[package]]904[[package]]
677name = "crossbeam-channel"905name = "crossbeam-channel"
678version = "0.4.2"906version = "0.4.4"
679source = "registry+https://github.com/rust-lang/crates.io-index"907source = "registry+https://github.com/rust-lang/crates.io-index"
680checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061"908checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87"
681dependencies = [909dependencies = [
682 "crossbeam-utils",910 "crossbeam-utils",
683 "maybe-uninit",911 "maybe-uninit",
700source = "registry+https://github.com/rust-lang/crates.io-index"928source = "registry+https://github.com/rust-lang/crates.io-index"
701checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"929checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
702dependencies = [930dependencies = [
703 "autocfg 1.0.0",931 "autocfg 1.0.1",
704 "cfg-if",932 "cfg-if 0.1.10",
705 "crossbeam-utils",933 "crossbeam-utils",
706 "lazy_static",934 "lazy_static",
707 "maybe-uninit",935 "maybe-uninit",
708 "memoffset",936 "memoffset",
709 "scopeguard",937 "scopeguard 1.1.0",
710]938]
711939
712[[package]]940[[package]]
715source = "registry+https://github.com/rust-lang/crates.io-index"943source = "registry+https://github.com/rust-lang/crates.io-index"
716checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"944checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"
717dependencies = [945dependencies = [
718 "cfg-if",946 "cfg-if 0.1.10",
719 "crossbeam-utils",947 "crossbeam-utils",
720 "maybe-uninit",948 "maybe-uninit",
721]949]
726source = "registry+https://github.com/rust-lang/crates.io-index"954source = "registry+https://github.com/rust-lang/crates.io-index"
727checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"955checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
728dependencies = [956dependencies = [
729 "autocfg 1.0.0",957 "autocfg 1.0.1",
730 "cfg-if",958 "cfg-if 0.1.10",
731 "lazy_static",959 "lazy_static",
732]960]
733961
753source = "registry+https://github.com/rust-lang/crates.io-index"981source = "registry+https://github.com/rust-lang/crates.io-index"
754checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"982checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
755dependencies = [983dependencies = [
756 "generic-array 0.14.3",984 "generic-array 0.14.4",
757 "subtle 2.2.3",985 "subtle 2.3.0",
758]986]
759987
760[[package]]988[[package]]
761name = "ct-logs"989name = "ct-logs"
762version = "0.6.0"990version = "0.7.0"
763source = "registry+https://github.com/rust-lang/crates.io-index"991source = "registry+https://github.com/rust-lang/crates.io-index"
764checksum = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113"992checksum = "8c8e13110a84b6315df212c045be706af261fd364791cad863285439ebba672e"
765dependencies = [993dependencies = [
766 "sct",994 "sct",
767]995]
996
997[[package]]
998name = "cuckoofilter"
999version = "0.3.2"
1000source = "registry+https://github.com/rust-lang/crates.io-index"
1001checksum = "8dd43f7cfaffe0a386636a10baea2ee05cc50df3b77bea4a456c9572a939bf1f"
1002dependencies = [
1003 "byteorder 0.5.3",
1004 "rand 0.3.23",
1005]
7681006
769[[package]]1007[[package]]
770name = "curve25519-dalek"1008name = "curve25519-dalek"
771version = "2.1.0"1009version = "2.1.0"
772source = "registry+https://github.com/rust-lang/crates.io-index"1010source = "registry+https://github.com/rust-lang/crates.io-index"
773checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5"1011checksum = "5d85653f070353a16313d0046f173f70d1aadd5b42600a14de626f0dfb3473a5"
774dependencies = [1012dependencies = [
775 "byteorder",1013 "byteorder 1.3.4",
776 "digest 0.8.1",1014 "digest 0.8.1",
777 "rand_core 0.5.1",1015 "rand_core 0.5.1",
778 "subtle 2.2.3",1016 "subtle 2.3.0",
779 "zeroize",1017 "zeroize",
780]1018]
1019
1020[[package]]
1021name = "curve25519-dalek"
1022version = "3.0.0"
1023source = "registry+https://github.com/rust-lang/crates.io-index"
1024checksum = "c8492de420e9e60bc9a1d66e2dbb91825390b738a388606600663fc529b4b307"
1025dependencies = [
1026 "byteorder 1.3.4",
1027 "digest 0.9.0",
1028 "rand_core 0.5.1",
1029 "subtle 2.3.0",
1030 "zeroize",
1031]
7811032
782[[package]]1033[[package]]
783name = "data-encoding"1034name = "data-encoding"
784version = "2.2.1"1035version = "2.3.0"
785source = "registry+https://github.com/rust-lang/crates.io-index"1036source = "registry+https://github.com/rust-lang/crates.io-index"
786checksum = "72aa14c04dfae8dd7d8a2b1cb7ca2152618cd01336dbfe704b8dcbf8d41dbd69"1037checksum = "d4d0e2d24e5ee3b23a01de38eefdcd978907890701f08ffffd4cb457ca4ee8d6"
7871038
788[[package]]1039[[package]]
789name = "derive_more"1040name = "derive_more"
790version = "0.99.9"1041version = "0.99.11"
791source = "registry+https://github.com/rust-lang/crates.io-index"1042source = "registry+https://github.com/rust-lang/crates.io-index"
792checksum = "298998b1cf6b5b2c8a7b023dfd45821825ce3ba8a8af55c921a0e734e4653f76"1043checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c"
793dependencies = [1044dependencies = [
794 "proc-macro2",1045 "proc-macro2",
795 "quote 1.0.7",1046 "quote",
796 "syn 1.0.34",1047 "syn",
797]1048]
7981049
799[[package]]1050[[package]]
811source = "registry+https://github.com/rust-lang/crates.io-index"1062source = "registry+https://github.com/rust-lang/crates.io-index"
812checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"1063checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
813dependencies = [1064dependencies = [
814 "generic-array 0.14.3",1065 "generic-array 0.14.4",
815]1066]
8161067
817[[package]]1068[[package]]
820source = "registry+https://github.com/rust-lang/crates.io-index"1071source = "registry+https://github.com/rust-lang/crates.io-index"
821checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c"1072checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c"
822dependencies = [1073dependencies = [
823 "cfg-if",1074 "cfg-if 0.1.10",
824 "dirs-sys",1075 "dirs-sys",
825]1076]
8261077
841source = "registry+https://github.com/rust-lang/crates.io-index"1092source = "registry+https://github.com/rust-lang/crates.io-index"
842checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea"1093checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea"
843dependencies = [1094dependencies = [
844 "byteorder",1095 "byteorder 1.3.4",
845 "quick-error",1096 "quick-error",
846]1097]
8471098
848[[package]]1099[[package]]
849name = "doc-comment"1100name = "dyn-clonable"
850version = "0.3.3"1101version = "0.9.0"
851source = "registry+https://github.com/rust-lang/crates.io-index"1102source = "registry+https://github.com/rust-lang/crates.io-index"
852checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"1103checksum = "4e9232f0e607a262ceb9bd5141a3dfb3e4db6994b31989bbfd845878cba59fd4"
1104dependencies = [
1105 "dyn-clonable-impl",
1106 "dyn-clone",
1107]
8531108
854[[package]]1109[[package]]
855name = "ed25519-dalek"1110name = "dyn-clonable-impl"
856version = "1.0.0-pre.3"1111version = "0.9.0"
857source = "registry+https://github.com/rust-lang/crates.io-index"1112source = "registry+https://github.com/rust-lang/crates.io-index"
858checksum = "978710b352437433c97b2bff193f2fb1dfd58a093f863dd95e225a19baa599a2"1113checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5"
859dependencies = [1114dependencies = [
860 "clear_on_drop",1115 "proc-macro2",
861 "curve25519-dalek",1116 "quote",
862 "rand 0.7.3",1117 "syn",
863 "sha2 0.8.2",
864]1118]
1119
1120[[package]]
1121name = "dyn-clone"
1122version = "1.0.2"
1123source = "registry+https://github.com/rust-lang/crates.io-index"
1124checksum = "4c53dc3a653e0f64081026e4bf048d48fec9fce90c66e8326ca7292df0ff2d82"
8651125
866[[package]]1126[[package]]
867name = "either"1127name = "ed25519"
868version = "1.5.3"1128version = "1.0.3"
869source = "registry+https://github.com/rust-lang/crates.io-index"1129source = "registry+https://github.com/rust-lang/crates.io-index"
870checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"1130checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef"
1131dependencies = [
1132 "signature",
1133]
8711134
872[[package]]1135[[package]]
873name = "enum-primitive-derive"1136name = "ed25519-dalek"
874version = "0.1.2"1137version = "1.0.1"
875source = "registry+https://github.com/rust-lang/crates.io-index"1138source = "registry+https://github.com/rust-lang/crates.io-index"
876checksum = "e2b90e520ec62c1864c8c78d637acbfe8baf5f63240f2fb8165b8325c07812dd"1139checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
877dependencies = [1140dependencies = [
878 "num-traits 0.1.43",1141 "curve25519-dalek 3.0.0",
1142 "ed25519",
879 "quote 0.3.15",1143 "rand 0.7.3",
1144 "serde",
880 "syn 0.11.11",1145 "sha2 0.9.1",
1146 "zeroize",
881]1147]
1148
1149[[package]]
1150name = "either"
1151version = "1.6.1"
1152source = "registry+https://github.com/rust-lang/crates.io-index"
1153checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
8821154
883[[package]]1155[[package]]
884name = "env_logger"1156name = "env_logger"
8951167
896[[package]]1168[[package]]
897name = "environmental"1169name = "environmental"
898version = "1.1.1"1170version = "1.1.2"
899source = "registry+https://github.com/rust-lang/crates.io-index"1171source = "registry+https://github.com/rust-lang/crates.io-index"
900checksum = "516aa8d7a71cb00a1c4146f0798549b93d083d4f189b3ced8f3de6b8f11ee6c4"1172checksum = "6576a1755ddffd988788025e75bce9e74b018f7cc226198fe931d077911c6d7e"
9011173
902[[package]]1174[[package]]
903name = "erased-serde"1175name = "erased-serde"
908 "serde",1180 "serde",
909]1181]
1182
1183[[package]]
1184name = "errno"
1185version = "0.2.6"
1186source = "registry+https://github.com/rust-lang/crates.io-index"
1187checksum = "6eab5ee3df98a279d9b316b1af6ac95422127b1290317e6d18c1743c99418b01"
1188dependencies = [
1189 "errno-dragonfly",
1190 "libc",
1191 "winapi 0.3.9",
1192]
1193
1194[[package]]
1195name = "errno-dragonfly"
1196version = "0.1.1"
1197source = "registry+https://github.com/rust-lang/crates.io-index"
1198checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067"
1199dependencies = [
1200 "gcc",
1201 "libc",
1202]
1203
1204[[package]]
1205name = "event-listener"
1206version = "2.5.1"
1207source = "registry+https://github.com/rust-lang/crates.io-index"
1208checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
9101209
911[[package]]1210[[package]]
912name = "exit-future"1211name = "exit-future"
913version = "0.2.0"1212version = "0.2.0"
914source = "registry+https://github.com/rust-lang/crates.io-index"1213source = "registry+https://github.com/rust-lang/crates.io-index"
915checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"1214checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"
916dependencies = [1215dependencies = [
917 "futures 0.3.5",1216 "futures 0.3.6",
918]1217]
9191218
920[[package]]1219[[package]]
934checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"1233checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
935dependencies = [1234dependencies = [
936 "proc-macro2",1235 "proc-macro2",
937 "quote 1.0.7",1236 "quote",
938 "syn 1.0.34",1237 "syn",
939 "synstructure",1238 "synstructure",
940]1239]
9411240
945source = "registry+https://github.com/rust-lang/crates.io-index"1244source = "registry+https://github.com/rust-lang/crates.io-index"
946checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"1245checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
1246
1247[[package]]
1248name = "fallible-iterator"
1249version = "0.2.0"
1250source = "registry+https://github.com/rust-lang/crates.io-index"
1251checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
1252
1253[[package]]
1254name = "fastrand"
1255version = "1.4.0"
1256source = "registry+https://github.com/rust-lang/crates.io-index"
1257checksum = "ca5faf057445ce5c9d4329e382b2ce7ca38550ef3b73a5348362d5f24e0c7fe3"
1258dependencies = [
1259 "instant",
1260]
9471261
948[[package]]1262[[package]]
949name = "fdlimit"1263name = "fdlimit"
950version = "0.1.4"1264version = "0.2.1"
951source = "registry+https://github.com/rust-lang/crates.io-index"1265source = "registry+https://github.com/rust-lang/crates.io-index"
952checksum = "0da54a593b34c71b889ee45f5b5bb900c74148c5f7f8c6a9479ee7899f69603c"1266checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b"
953dependencies = [1267dependencies = [
954 "libc",1268 "libc",
955]1269]
1270
1271[[package]]
1272name = "file-per-thread-logger"
1273version = "0.1.4"
1274source = "registry+https://github.com/rust-lang/crates.io-index"
1275checksum = "4fdbe0d94371f9ce939b555dd342d0686cc4c0cadbcd4b61d70af5ff97eb4126"
1276dependencies = [
1277 "env_logger",
1278 "log",
1279]
9561280
957[[package]]1281[[package]]
958name = "finality-grandpa"1282name = "finality-grandpa"
961checksum = "8feb87a63249689640ac9c011742c33139204e3c134293d3054022276869133b"1285checksum = "8feb87a63249689640ac9c011742c33139204e3c134293d3054022276869133b"
962dependencies = [1286dependencies = [
963 "either",1287 "either",
964 "futures 0.3.5",1288 "futures 0.3.6",
965 "futures-timer 2.0.2",1289 "futures-timer 2.0.2",
966 "log",1290 "log",
967 "num-traits 0.2.12",1291 "num-traits",
968 "parity-scale-codec",1292 "parity-scale-codec",
969 "parking_lot 0.9.0",1293 "parking_lot 0.9.0",
970]1294]
975source = "registry+https://github.com/rust-lang/crates.io-index"1299source = "registry+https://github.com/rust-lang/crates.io-index"
976checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c"1300checksum = "11498d382790b7a8f2fd211780bec78619bba81cdad3a283997c0c41f836759c"
977dependencies = [1301dependencies = [
978 "byteorder",1302 "byteorder 1.3.4",
979 "rand 0.7.3",1303 "rand 0.7.3",
980 "rustc-hex",1304 "rustc-hex",
981 "static_assertions",1305 "static_assertions",
9891313
990[[package]]1314[[package]]
991name = "flate2"1315name = "flate2"
992version = "1.0.16"1316version = "1.0.18"
993source = "registry+https://github.com/rust-lang/crates.io-index"1317source = "registry+https://github.com/rust-lang/crates.io-index"
994checksum = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e"1318checksum = "da80be589a72651dcda34d8b35bcdc9b7254ad06325611074d9cc0fbb19f60ee"
995dependencies = [1319dependencies = [
996 "cfg-if",1320 "cfg-if 0.1.10",
997 "crc32fast",1321 "crc32fast",
998 "libc",1322 "libc",
999 "libz-sys",1323 "libz-sys",
10081332
1009[[package]]1333[[package]]
1010name = "fork-tree"1334name = "fork-tree"
1011version = "2.0.0-rc4"1335version = "2.0.0"
1012source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1336source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1013dependencies = [1337dependencies = [
1014 "parity-scale-codec",1338 "parity-scale-codec",
1015]1339]
10161340
1017[[package]]1341[[package]]
1018name = "frame-benchmarking"1342name = "frame-benchmarking"
1019version = "2.0.0-rc4"1343version = "2.0.0"
1020source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1344source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1021dependencies = [1345dependencies = [
1022 "frame-support",1346 "frame-support",
1023 "frame-system",1347 "frame-system",
1029 "sp-runtime",1353 "sp-runtime",
1030 "sp-runtime-interface",1354 "sp-runtime-interface",
1031 "sp-std",1355 "sp-std",
1356 "sp-storage",
1032]1357]
1358
1359[[package]]
1360name = "frame-benchmarking-cli"
1361version = "2.0.0"
1362source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1363dependencies = [
1364 "frame-benchmarking",
1365 "parity-scale-codec",
1366 "sc-cli",
1367 "sc-client-db",
1368 "sc-executor",
1369 "sc-service",
1370 "sp-core",
1371 "sp-externalities",
1372 "sp-runtime",
1373 "sp-state-machine",
1374 "structopt",
1375]
10331376
1034[[package]]1377[[package]]
1035name = "frame-executive"1378name = "frame-executive"
1036version = "2.0.0-rc4"1379version = "2.0.0"
1037source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1380source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1038dependencies = [1381dependencies = [
1039 "frame-support",1382 "frame-support",
1040 "frame-system",1383 "frame-system",
1041 "parity-scale-codec",1384 "parity-scale-codec",
1042 "serde",1385 "serde",
1386 "sp-core",
1043 "sp-io",1387 "sp-io",
1044 "sp-runtime",1388 "sp-runtime",
1045 "sp-std",1389 "sp-std",
10481392
1049[[package]]1393[[package]]
1050name = "frame-metadata"1394name = "frame-metadata"
1051version = "11.0.0-rc4"1395version = "12.0.0"
1052source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1396source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1053dependencies = [1397dependencies = [
1054 "parity-scale-codec",1398 "parity-scale-codec",
1055 "serde",1399 "serde",
10591403
1060[[package]]1404[[package]]
1061name = "frame-support"1405name = "frame-support"
1062version = "2.0.0-rc4"1406version = "2.0.0"
1063source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1407source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1064dependencies = [1408dependencies = [
1065 "bitmask",1409 "bitmask",
1066 "frame-metadata",1410 "frame-metadata",
1067 "frame-support-procedural",1411 "frame-support-procedural",
1068 "impl-trait-for-tuples",1412 "impl-trait-for-tuples",
1069 "log",1413 "log",
1070 "once_cell",1414 "once_cell 1.4.1",
1071 "parity-scale-codec",1415 "parity-scale-codec",
1072 "paste",1416 "paste",
1073 "serde",1417 "serde",
1074 "smallvec 1.4.1",1418 "smallvec 1.4.2",
1075 "sp-arithmetic",1419 "sp-arithmetic",
1076 "sp-core",1420 "sp-core",
1077 "sp-inherents",1421 "sp-inherents",
10841428
1085[[package]]1429[[package]]
1086name = "frame-support-procedural"1430name = "frame-support-procedural"
1087version = "2.0.0-rc4"1431version = "2.0.0"
1088source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1432source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1089dependencies = [1433dependencies = [
1090 "frame-support-procedural-tools",1434 "frame-support-procedural-tools",
1091 "proc-macro2",1435 "proc-macro2",
1092 "quote 1.0.7",1436 "quote",
1093 "syn 1.0.34",1437 "syn",
1094]1438]
10951439
1096[[package]]1440[[package]]
1097name = "frame-support-procedural-tools"1441name = "frame-support-procedural-tools"
1098version = "2.0.0-rc4"1442version = "2.0.0"
1099source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1443source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1100dependencies = [1444dependencies = [
1101 "frame-support-procedural-tools-derive",1445 "frame-support-procedural-tools-derive",
1102 "proc-macro-crate",1446 "proc-macro-crate",
1103 "proc-macro2",1447 "proc-macro2",
1104 "quote 1.0.7",1448 "quote",
1105 "syn 1.0.34",1449 "syn",
1106]1450]
11071451
1108[[package]]1452[[package]]
1109name = "frame-support-procedural-tools-derive"1453name = "frame-support-procedural-tools-derive"
1110version = "2.0.0-rc4"1454version = "2.0.0"
1111source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1455source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1112dependencies = [1456dependencies = [
1113 "proc-macro2",1457 "proc-macro2",
1114 "quote 1.0.7",1458 "quote",
1115 "syn 1.0.34",1459 "syn",
1116]1460]
11171461
1118[[package]]1462[[package]]
1119name = "frame-system"1463name = "frame-system"
1120version = "2.0.0-rc4"1464version = "2.0.0"
1121source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"1465source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1122dependencies = [1466dependencies = [
1123 "frame-support",1467 "frame-support",
1124 "impl-trait-for-tuples",1468 "impl-trait-for-tuples",
1131 "sp-version",1475 "sp-version",
1132]1476]
1477
1478[[package]]
1479name = "frame-system-benchmarking"
1480version = "2.0.0"
1481source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1482dependencies = [
1483 "frame-benchmarking",
1484 "frame-support",
1485 "frame-system",
1486 "parity-scale-codec",
1487 "sp-core",
1488 "sp-runtime",
1489 "sp-std",
1490]
1491
1492[[package]]
1493name = "frame-system-rpc-runtime-api"
1494version = "2.0.0"
1495source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
1496dependencies = [
1497 "parity-scale-codec",
1498 "sp-api",
1499]
11331500
1134[[package]]1501[[package]]
1135name = "fs-swap"1502name = "fs-swap"
11671534
1168[[package]]1535[[package]]
1169name = "futures"1536name = "futures"
1170version = "0.1.29"1537version = "0.1.30"
1171source = "registry+https://github.com/rust-lang/crates.io-index"1538source = "registry+https://github.com/rust-lang/crates.io-index"
1172checksum = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef"1539checksum = "4c7e4c2612746b0df8fed4ce0c69156021b704c9aefa360311c04e6e9e002eed"
11731540
1174[[package]]1541[[package]]
1175name = "futures"1542name = "futures"
1176version = "0.3.5"1543version = "0.3.6"
1177source = "registry+https://github.com/rust-lang/crates.io-index"1544source = "registry+https://github.com/rust-lang/crates.io-index"
1178checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613"1545checksum = "5d8e3078b7b2a8a671cb7a3d17b4760e4181ea243227776ba83fd043b4ca034e"
1179dependencies = [1546dependencies = [
1180 "futures-channel",1547 "futures-channel",
1181 "futures-core",1548 "futures-core",
11881555
1189[[package]]1556[[package]]
1190name = "futures-channel"1557name = "futures-channel"
1191version = "0.3.5"1558version = "0.3.6"
1192source = "registry+https://github.com/rust-lang/crates.io-index"1559source = "registry+https://github.com/rust-lang/crates.io-index"
1193checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5"1560checksum = "a7a4d35f7401e948629c9c3d6638fb9bf94e0b2121e96c3b428cc4e631f3eb74"
1194dependencies = [1561dependencies = [
1195 "futures-core",1562 "futures-core",
1196 "futures-sink",1563 "futures-sink",
12071574
1208[[package]]1575[[package]]
1209name = "futures-core"1576name = "futures-core"
1210version = "0.3.5"1577version = "0.3.6"
1211source = "registry+https://github.com/rust-lang/crates.io-index"1578source = "registry+https://github.com/rust-lang/crates.io-index"
1212checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399"1579checksum = "d674eaa0056896d5ada519900dbf97ead2e46a7b6621e8160d79e2f2e1e2784b"
12131580
1214[[package]]1581[[package]]
1215name = "futures-core-preview"1582name = "futures-core-preview"
1223source = "registry+https://github.com/rust-lang/crates.io-index"1590source = "registry+https://github.com/rust-lang/crates.io-index"
1224checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"1591checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
1225dependencies = [1592dependencies = [
1226 "futures 0.1.29",1593 "futures 0.1.30",
1227 "num_cpus",1594 "num_cpus",
1228]1595]
12291596
1233source = "registry+https://github.com/rust-lang/crates.io-index"1600source = "registry+https://github.com/rust-lang/crates.io-index"
1234checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9"1601checksum = "fdcef58a173af8148b182684c9f2d5250875adbcaff7b5794073894f9d8634a9"
1235dependencies = [1602dependencies = [
1236 "futures 0.1.29",1603 "futures 0.1.30",
1237 "futures 0.3.5",1604 "futures 0.3.6",
1238 "lazy_static",1605 "lazy_static",
1239 "log",1606 "log",
1240 "parking_lot 0.9.0",1607 "parking_lot 0.9.0",
12451612
1246[[package]]1613[[package]]
1247name = "futures-executor"1614name = "futures-executor"
1248version = "0.3.5"1615version = "0.3.6"
1249source = "registry+https://github.com/rust-lang/crates.io-index"1616source = "registry+https://github.com/rust-lang/crates.io-index"
1250checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314"1617checksum = "cc709ca1da6f66143b8c9bec8e6260181869893714e9b5a490b169b0414144ab"
1251dependencies = [1618dependencies = [
1252 "futures-core",1619 "futures-core",
1253 "futures-task",1620 "futures-task",
12571624
1258[[package]]1625[[package]]
1259name = "futures-io"1626name = "futures-io"
1260version = "0.3.5"1627version = "0.3.6"
1261source = "registry+https://github.com/rust-lang/crates.io-index"1628source = "registry+https://github.com/rust-lang/crates.io-index"
1262checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789"1629checksum = "5fc94b64bb39543b4e432f1790b6bf18e3ee3b74653c5449f63310e9a74b123c"
1630
1631[[package]]
1632name = "futures-lite"
1633version = "1.11.1"
1634source = "registry+https://github.com/rust-lang/crates.io-index"
1635checksum = "381a7ad57b1bad34693f63f6f377e1abded7a9c85c9d3eb6771e11c60aaadab9"
1636dependencies = [
1637 "fastrand",
1638 "futures-core",
1639 "futures-io",
1640 "memchr",
1641 "parking",
1642 "pin-project-lite",
1643 "waker-fn",
1644]
12631645
1264[[package]]1646[[package]]
1265name = "futures-macro"1647name = "futures-macro"
1266version = "0.3.5"1648version = "0.3.6"
1267source = "registry+https://github.com/rust-lang/crates.io-index"1649source = "registry+https://github.com/rust-lang/crates.io-index"
1268checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39"1650checksum = "f57ed14da4603b2554682e9f2ff3c65d7567b53188db96cb71538217fc64581b"
1269dependencies = [1651dependencies = [
1270 "proc-macro-hack",1652 "proc-macro-hack",
1271 "proc-macro2",1653 "proc-macro2",
1272 "quote 1.0.7",1654 "quote",
1273 "syn 1.0.34",1655 "syn",
1274]1656]
12751657
1276[[package]]1658[[package]]
1277name = "futures-sink"1659name = "futures-sink"
1278version = "0.3.5"1660version = "0.3.6"
1279source = "registry+https://github.com/rust-lang/crates.io-index"1661source = "registry+https://github.com/rust-lang/crates.io-index"
1280checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc"1662checksum = "0d8764258ed64ebc5d9ed185cf86a95db5cac810269c5d20ececb32e0088abbd"
12811663
1282[[package]]1664[[package]]
1283name = "futures-task"1665name = "futures-task"
1284version = "0.3.5"1666version = "0.3.6"
1285source = "registry+https://github.com/rust-lang/crates.io-index"1667source = "registry+https://github.com/rust-lang/crates.io-index"
1286checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626"1668checksum = "4dd26820a9f3637f1302da8bceba3ff33adbe53464b54ca24d4e2d4f1db30f94"
1287dependencies = [1669dependencies = [
1288 "once_cell",1670 "once_cell 1.4.1",
1289]1671]
12901672
1291[[package]]1673[[package]]
13021684
1303[[package]]1685[[package]]
1304name = "futures-util"1686name = "futures-util"
1305version = "0.3.5"1687version = "0.3.6"
1306source = "registry+https://github.com/rust-lang/crates.io-index"1688source = "registry+https://github.com/rust-lang/crates.io-index"
1307checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6"1689checksum = "8a894a0acddba51a2d49a6f4263b1e64b8c579ece8af50fa86503d52cd1eea34"
1308dependencies = [1690dependencies = [
1309 "futures 0.1.29",1691 "futures 0.1.30",
1310 "futures-channel",1692 "futures-channel",
1311 "futures-core",1693 "futures-core",
1312 "futures-io",1694 "futures-io",
1333 "slab",1715 "slab",
1334]1716]
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]
13471717
1348[[package]]1718[[package]]
1349name = "futures_codec"1719name = "futures_codec"
1352checksum = "ce54d63f8b0c75023ed920d46fd71d0cbbb830b0ee012726b5b4f506fb6dea5b"1722checksum = "ce54d63f8b0c75023ed920d46fd71d0cbbb830b0ee012726b5b4f506fb6dea5b"
1353dependencies = [1723dependencies = [
1354 "bytes 0.5.6",1724 "bytes 0.5.6",
1355 "futures 0.3.5",1725 "futures 0.3.6",
1356 "memchr",1726 "memchr",
1357 "pin-project",1727 "pin-project",
1358]1728]
13741744
1375[[package]]1745[[package]]
1376name = "generic-array"1746name = "generic-array"
1377version = "0.14.3"1747version = "0.14.4"
1378source = "registry+https://github.com/rust-lang/crates.io-index"1748source = "registry+https://github.com/rust-lang/crates.io-index"
1379checksum = "60fb4bb6bba52f78a471264d9a3b7d026cc0af47b22cd2cffbc0b787ca003e63"1749checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
1380dependencies = [1750dependencies = [
1381 "typenum",1751 "typenum",
1382 "version_check",1752 "version_check",
14061776
1407[[package]]1777[[package]]
1408name = "getrandom"1778name = "getrandom"
1409version = "0.1.14"1779version = "0.1.15"
1410source = "registry+https://github.com/rust-lang/crates.io-index"1780source = "registry+https://github.com/rust-lang/crates.io-index"
1411checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"1781checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
1412dependencies = [1782dependencies = [
1413 "cfg-if",1783 "cfg-if 0.1.10",
1414 "libc",1784 "libc",
1415 "wasi",1785 "wasi 0.9.0+wasi-snapshot-preview1",
1416]1786]
1787
1788[[package]]
1789name = "getrandom"
1790version = "0.2.0"
1791source = "registry+https://github.com/rust-lang/crates.io-index"
1792checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4"
1793dependencies = [
1794 "cfg-if 0.1.10",
1795 "libc",
1796 "wasi 0.9.0+wasi-snapshot-preview1",
1797]
14171798
1418[[package]]1799[[package]]
1419name = "ghash"1800name = "ghash"
1424 "polyval",1805 "polyval",
1425]1806]
1807
1808[[package]]
1809name = "gimli"
1810version = "0.21.0"
1811source = "registry+https://github.com/rust-lang/crates.io-index"
1812checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c"
1813dependencies = [
1814 "fallible-iterator",
1815 "indexmap",
1816 "stable_deref_trait",
1817]
14261818
1427[[package]]1819[[package]]
1428name = "gimli"1820name = "gimli"
1449 "regex",1841 "regex",
1450]1842]
1843
1844[[package]]
1845name = "gloo-timers"
1846version = "0.2.1"
1847source = "registry+https://github.com/rust-lang/crates.io-index"
1848checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f"
1849dependencies = [
1850 "futures-channel",
1851 "futures-core",
1852 "js-sys",
1853 "wasm-bindgen",
1854 "web-sys",
1855]
14511856
1452[[package]]1857[[package]]
1453name = "h2"1858name = "h2"
1454version = "0.1.26"1859version = "0.1.26"
1455source = "registry+https://github.com/rust-lang/crates.io-index"1860source = "registry+https://github.com/rust-lang/crates.io-index"
1456checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462"1861checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462"
1457dependencies = [1862dependencies = [
1458 "byteorder",1863 "byteorder 1.3.4",
1459 "bytes 0.4.12",1864 "bytes 0.4.12",
1460 "fnv",1865 "fnv",
1461 "futures 0.1.29",1866 "futures 0.1.30",
1462 "http 0.1.21",1867 "http 0.1.21",
1463 "indexmap",1868 "indexmap",
1464 "log",1869 "log",
1481 "http 0.2.1",1886 "http 0.2.1",
1482 "indexmap",1887 "indexmap",
1483 "slab",1888 "slab",
1484 "tokio 0.2.21",1889 "tokio 0.2.22",
1485 "tokio-util",1890 "tokio-util",
1486 "tracing",1891 "tracing",
1487]1892]
1501 "crunchy",1906 "crunchy",
1502]1907]
1908
1909[[package]]
1910name = "hashbrown"
1911version = "0.1.8"
1912source = "registry+https://github.com/rust-lang/crates.io-index"
1913checksum = "3bae29b6653b3412c2e71e9d486db9f9df5d701941d86683005efb9f2d28e3da"
1914dependencies = [
1915 "byteorder 1.3.4",
1916 "scopeguard 0.3.3",
1917]
15031918
1504[[package]]1919[[package]]
1505name = "hashbrown"1920name = "hashbrown"
1506version = "0.6.3"1921version = "0.6.3"
1507source = "registry+https://github.com/rust-lang/crates.io-index"1922source = "registry+https://github.com/rust-lang/crates.io-index"
1508checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead"1923checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead"
1509dependencies = [1924dependencies = [
1510 "ahash",1925 "ahash 0.2.19",
1511 "autocfg 0.1.7",1926 "autocfg 0.1.7",
1512]1927]
15131928
1514[[package]]1929[[package]]
1515name = "hashbrown"1930name = "hashbrown"
1516version = "0.8.1"1931version = "0.8.2"
1517source = "registry+https://github.com/rust-lang/crates.io-index"1932source = "registry+https://github.com/rust-lang/crates.io-index"
1518checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb"1933checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25"
1519dependencies = [1934dependencies = [
1935 "ahash 0.3.8",
1520 "autocfg 1.0.0",1936 "autocfg 1.0.1",
1521]1937]
1938
1939[[package]]
1940name = "hashbrown"
1941version = "0.9.1"
1942source = "registry+https://github.com/rust-lang/crates.io-index"
1943checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
15221944
1523[[package]]1945[[package]]
1524name = "heck"1946name = "heck"
15311953
1532[[package]]1954[[package]]
1533name = "hermit-abi"1955name = "hermit-abi"
1534version = "0.1.15"1956version = "0.1.17"
1535source = "registry+https://github.com/rust-lang/crates.io-index"1957source = "registry+https://github.com/rust-lang/crates.io-index"
1536checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9"1958checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
1537dependencies = [1959dependencies = [
1538 "libc",1960 "libc",
1539]1961]
15461968
1547[[package]]1969[[package]]
1548name = "hex-literal"1970name = "hex-literal"
1549version = "0.2.1"1971version = "0.3.1"
1550source = "registry+https://github.com/rust-lang/crates.io-index"1972source = "registry+https://github.com/rust-lang/crates.io-index"
1551checksum = "961de220ec9a91af2e1e5bd80d02109155695e516771762381ef8581317066e0"1973checksum = "5af1f635ef1bc545d78392b136bfe1c9809e029023c84a3638a864a10b8819c8"
1552dependencies = [
1553 "hex-literal-impl",
1554 "proc-macro-hack",
1555]
15561974
1557[[package]]1975[[package]]
1558name = "hex-literal-impl"1976name = "hex_fmt"
1559version = "0.2.2"1977version = "0.3.0"
1560source = "registry+https://github.com/rust-lang/crates.io-index"1978source = "registry+https://github.com/rust-lang/crates.io-index"
1561checksum = "853f769599eb31de176303197b7ba4973299c38c7a7604a6bc88c3eef05b9b46"1979checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f"
1562dependencies = [
1563 "proc-macro-hack",
1564]
15651980
1566[[package]]1981[[package]]
1567name = "hmac"1982name = "hmac"
1613checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d"2028checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d"
1614dependencies = [2029dependencies = [
1615 "bytes 0.4.12",2030 "bytes 0.4.12",
1616 "futures 0.1.29",2031 "futures 0.1.30",
1617 "http 0.1.21",2032 "http 0.1.21",
1618 "tokio-buf",2033 "tokio-buf",
1619]2034]
1634source = "registry+https://github.com/rust-lang/crates.io-index"2049source = "registry+https://github.com/rust-lang/crates.io-index"
1635checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"2050checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
2051
2052[[package]]
2053name = "httpdate"
2054version = "0.3.2"
2055source = "registry+https://github.com/rust-lang/crates.io-index"
2056checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
16362057
1637[[package]]2058[[package]]
1638name = "humantime"2059name = "humantime"
1650checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6"2071checksum = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6"
1651dependencies = [2072dependencies = [
1652 "bytes 0.4.12",2073 "bytes 0.4.12",
1653 "futures 0.1.29",2074 "futures 0.1.30",
1654 "futures-cpupool",2075 "futures-cpupool",
1655 "h2 0.1.26",2076 "h2 0.1.26",
1656 "http 0.1.21",2077 "http 0.1.21",
16752096
1676[[package]]2097[[package]]
1677name = "hyper"2098name = "hyper"
1678version = "0.13.7"2099version = "0.13.8"
1679source = "registry+https://github.com/rust-lang/crates.io-index"2100source = "registry+https://github.com/rust-lang/crates.io-index"
1680checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb"2101checksum = "2f3afcfae8af5ad0576a31e768415edb627824129e8e5a29b8bfccb2f234e835"
1681dependencies = [2102dependencies = [
1682 "bytes 0.5.6",2103 "bytes 0.5.6",
1683 "futures-channel",2104 "futures-channel",
1687 "http 0.2.1",2108 "http 0.2.1",
1688 "http-body 0.3.1",2109 "http-body 0.3.1",
1689 "httparse",2110 "httparse",
2111 "httpdate",
1690 "itoa",2112 "itoa",
1691 "pin-project",2113 "pin-project",
1692 "socket2",2114 "socket2",
1693 "time",
1694 "tokio 0.2.21",2115 "tokio 0.2.22",
1695 "tower-service",2116 "tower-service",
1696 "tracing",2117 "tracing",
1697 "want 0.3.0",2118 "want 0.3.0",
1698]2119]
16992120
1700[[package]]2121[[package]]
1701name = "hyper-rustls"2122name = "hyper-rustls"
1702version = "0.20.0"2123version = "0.21.0"
1703source = "registry+https://github.com/rust-lang/crates.io-index"2124source = "registry+https://github.com/rust-lang/crates.io-index"
1704checksum = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08"2125checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6"
1705dependencies = [2126dependencies = [
1706 "bytes 0.5.6",2127 "bytes 0.5.6",
1707 "ct-logs",2128 "ct-logs",
1708 "futures-util",2129 "futures-util",
1709 "hyper 0.13.7",2130 "hyper 0.13.8",
1710 "log",2131 "log",
1711 "rustls",2132 "rustls",
1712 "rustls-native-certs",2133 "rustls-native-certs",
1713 "tokio 0.2.21",2134 "tokio 0.2.22",
1714 "tokio-rustls",2135 "tokio-rustls",
1715 "webpki",2136 "webpki",
1716]2137]
1746 "parity-scale-codec",2167 "parity-scale-codec",
1747]2168]
1748
1749[[package]]
1750name = "impl-serde"
1751version = "0.2.3"
1752source = "registry+https://github.com/rust-lang/crates.io-index"
1753checksum = "58e3cae7e99c7ff5a995da2cf78dd0a5383740eda71d98cf7b1910c301ac69b8"
1754dependencies = [
1755 "serde",
1756]
17572169
1758[[package]]2170[[package]]
1759name = "impl-serde"2171name = "impl-serde"
1771checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d"2183checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d"
1772dependencies = [2184dependencies = [
1773 "proc-macro2",2185 "proc-macro2",
1774 "quote 1.0.7",2186 "quote",
1775 "syn 1.0.34",2187 "syn",
1776]2188]
17772189
1778[[package]]2190[[package]]
1779name = "indexmap"2191name = "indexmap"
1780version = "1.5.0"2192version = "1.6.0"
1781source = "registry+https://github.com/rust-lang/crates.io-index"2193source = "registry+https://github.com/rust-lang/crates.io-index"
1782checksum = "5b88cd59ee5f71fea89a62248fc8f387d44400cefe05ef548466d61ced9029a7"2194checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2"
1783dependencies = [2195dependencies = [
1784 "autocfg 1.0.0",2196 "autocfg 1.0.1",
1785 "hashbrown 0.8.1",2197 "hashbrown 0.9.1",
2198 "serde",
1786]2199]
2200
2201[[package]]
2202name = "instant"
2203version = "0.1.7"
2204source = "registry+https://github.com/rust-lang/crates.io-index"
2205checksum = "63312a18f7ea8760cdd0a7c5aac1a619752a246b833545e3e36d1f81f7cd9e66"
2206dependencies = [
2207 "cfg-if 0.1.10",
2208]
17872209
1788[[package]]2210[[package]]
1789name = "integer-sqrt"2211name = "integer-sqrt"
1790version = "0.1.3"2212version = "0.1.5"
1791source = "registry+https://github.com/rust-lang/crates.io-index"2213source = "registry+https://github.com/rust-lang/crates.io-index"
1792checksum = "f65877bf7d44897a473350b1046277941cee20b263397e90869c50b6e766088b"2214checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770"
2215dependencies = [
2216 "num-traits",
2217]
17932218
1794[[package]]2219[[package]]
1795name = "intervalier"2220name = "intervalier"
1796version = "0.4.0"2221version = "0.4.0"
1797source = "registry+https://github.com/rust-lang/crates.io-index"2222source = "registry+https://github.com/rust-lang/crates.io-index"
1798checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"2223checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"
1799dependencies = [2224dependencies = [
1800 "futures 0.3.5",2225 "futures 0.3.6",
1801 "futures-timer 2.0.2",2226 "futures-timer 2.0.2",
1802]2227]
18032228
18572282
1858[[package]]2283[[package]]
1859name = "js-sys"2284name = "js-sys"
1860version = "0.3.42"2285version = "0.3.45"
1861source = "registry+https://github.com/rust-lang/crates.io-index"2286source = "registry+https://github.com/rust-lang/crates.io-index"
1862checksum = "52732a3d3ad72c58ad2dc70624f9c17b46ecd0943b9a4f1ee37c4c18c5d983e2"2287checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8"
1863dependencies = [2288dependencies = [
1864 "wasm-bindgen",2289 "wasm-bindgen",
1865]2290]
18662291
1867[[package]]2292[[package]]
1868name = "jsonrpc-client-transports"2293name = "jsonrpc-client-transports"
1869version = "14.2.0"2294version = "15.1.0"
1870source = "registry+https://github.com/rust-lang/crates.io-index"2295source = "registry+https://github.com/rust-lang/crates.io-index"
1871checksum = "ecbdaacc17243168d9d1fa6b2bd7556a27e1e60a621d8a2a6e590ae2b145d158"2296checksum = "489b9c612e60c766f751ab40fcb43cbb55a1e10bb44a9b4307ed510ca598cbd7"
1872dependencies = [2297dependencies = [
1873 "failure",2298 "failure",
1874 "futures 0.1.29",2299 "futures 0.1.30",
1875 "jsonrpc-core",2300 "jsonrpc-core",
1876 "jsonrpc-pubsub",2301 "jsonrpc-pubsub",
1877 "log",2302 "log",
18822307
1883[[package]]2308[[package]]
1884name = "jsonrpc-core"2309name = "jsonrpc-core"
1885version = "14.2.0"2310version = "15.1.0"
1886source = "registry+https://github.com/rust-lang/crates.io-index"2311source = "registry+https://github.com/rust-lang/crates.io-index"
1887checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62"2312checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa"
1888dependencies = [2313dependencies = [
1889 "futures 0.1.29",2314 "futures 0.1.30",
1890 "log",2315 "log",
1891 "serde",2316 "serde",
1892 "serde_derive",2317 "serde_derive",
18952320
1896[[package]]2321[[package]]
1897name = "jsonrpc-core-client"2322name = "jsonrpc-core-client"
1898version = "14.2.0"2323version = "15.1.0"
1899source = "registry+https://github.com/rust-lang/crates.io-index"2324source = "registry+https://github.com/rust-lang/crates.io-index"
1900checksum = "34221123bc79b66279a3fde2d3363553835b43092d629b34f2e760c44dc94713"2325checksum = "6f764902d7b891344a0acb65625f32f6f7c6db006952143bd650209fbe7d94db"
1901dependencies = [2326dependencies = [
1902 "jsonrpc-client-transports",2327 "jsonrpc-client-transports",
1903]2328]
19042329
1905[[package]]2330[[package]]
1906name = "jsonrpc-derive"2331name = "jsonrpc-derive"
1907version = "14.2.1"2332version = "15.1.0"
1908source = "registry+https://github.com/rust-lang/crates.io-index"2333source = "registry+https://github.com/rust-lang/crates.io-index"
1909checksum = "0fadf6945e227246825a583514534d864554e9f23d80b3c77d034b10983db5ef"2334checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3"
1910dependencies = [2335dependencies = [
1911 "proc-macro-crate",2336 "proc-macro-crate",
1912 "proc-macro2",2337 "proc-macro2",
1913 "quote 1.0.7",2338 "quote",
1914 "syn 1.0.34",2339 "syn",
1915]2340]
19162341
1917[[package]]2342[[package]]
1918name = "jsonrpc-http-server"2343name = "jsonrpc-http-server"
1919version = "14.2.0"2344version = "15.1.0"
1920source = "registry+https://github.com/rust-lang/crates.io-index"2345source = "registry+https://github.com/rust-lang/crates.io-index"
1921checksum = "0da906d682799df05754480dac1b9e70ec92e12c19ebafd2662a5ea1c9fd6522"2346checksum = "4fb5c4513b7b542f42da107942b7b759f27120b5cc894729f88254b28dff44b7"
1922dependencies = [2347dependencies = [
1923 "hyper 0.12.35",2348 "hyper 0.12.35",
1924 "jsonrpc-core",2349 "jsonrpc-core",
19312356
1932[[package]]2357[[package]]
1933name = "jsonrpc-ipc-server"2358name = "jsonrpc-ipc-server"
1934version = "14.2.0"2359version = "15.1.0"
1935source = "registry+https://github.com/rust-lang/crates.io-index"2360source = "registry+https://github.com/rust-lang/crates.io-index"
1936checksum = "dedccd693325d833963b549e959137f30a7a0ea650cde92feda81dc0c1393cb5"2361checksum = "cf50e53e4eea8f421a7316c5f63e395f7bc7c4e786a6dc54d76fab6ff7aa7ce7"
1937dependencies = [2362dependencies = [
1938 "jsonrpc-core",2363 "jsonrpc-core",
1939 "jsonrpc-server-utils",2364 "jsonrpc-server-utils",
19452370
1946[[package]]2371[[package]]
1947name = "jsonrpc-pubsub"2372name = "jsonrpc-pubsub"
1948version = "14.2.0"2373version = "15.1.0"
1949source = "registry+https://github.com/rust-lang/crates.io-index"2374source = "registry+https://github.com/rust-lang/crates.io-index"
1950checksum = "2d44f5602a11d657946aac09357956d2841299ed422035edf140c552cb057986"2375checksum = "639558e0604013be9787ae52f798506ae42bf4220fe587bdc5625871cc8b9c77"
1951dependencies = [2376dependencies = [
1952 "jsonrpc-core",2377 "jsonrpc-core",
1953 "log",2378 "log",
19582383
1959[[package]]2384[[package]]
1960name = "jsonrpc-server-utils"2385name = "jsonrpc-server-utils"
1961version = "14.2.0"2386version = "15.1.0"
1962source = "registry+https://github.com/rust-lang/crates.io-index"2387source = "registry+https://github.com/rust-lang/crates.io-index"
1963checksum = "56cbfb462e7f902e21121d9f0d1c2b77b2c5b642e1a4e8f4ebfa2e15b94402bb"2388checksum = "72f1f3990650c033bd8f6bd46deac76d990f9bbfb5f8dc8c4767bf0a00392176"
1964dependencies = [2389dependencies = [
1965 "bytes 0.4.12",2390 "bytes 0.4.12",
1966 "globset",2391 "globset",
19742399
1975[[package]]2400[[package]]
1976name = "jsonrpc-ws-server"2401name = "jsonrpc-ws-server"
1977version = "14.2.0"2402version = "15.1.0"
1978source = "registry+https://github.com/rust-lang/crates.io-index"2403source = "registry+https://github.com/rust-lang/crates.io-index"
1979checksum = "903d3109fe7c4acb932b567e1e607e0f524ed04741b09fb0e61841bc40a022fc"2404checksum = "6596fe75209b73a2a75ebe1dce4e60e03b88a2b25e8807b667597f6315150d22"
1980dependencies = [2405dependencies = [
1981 "jsonrpc-core",2406 "jsonrpc-core",
1982 "jsonrpc-server-utils",2407 "jsonrpc-server-utils",
1983 "log",2408 "log",
2409 "parity-ws",
1984 "parking_lot 0.10.2",2410 "parking_lot 0.10.2",
1985 "slab",2411 "slab",
1986 "ws",
1987]2412]
19882413
1989[[package]]2414[[package]]
20132438
2014[[package]]2439[[package]]
2015name = "kvdb"2440name = "kvdb"
2016version = "0.6.0"2441version = "0.7.0"
2017source = "registry+https://github.com/rust-lang/crates.io-index"2442source = "registry+https://github.com/rust-lang/crates.io-index"
2018checksum = "e763b2a9b500ba47948061d1e8bc3b5f03a8a1f067dbcf822a4d2c84d2b54a3a"2443checksum = "0315ef2f688e33844400b31f11c263f2b3dc21d8b9355c6891c5f185fae43f9a"
2019dependencies = [2444dependencies = [
2020 "parity-util-mem",2445 "parity-util-mem",
2021 "smallvec 1.4.1",2446 "smallvec 1.4.2",
2022]2447]
20232448
2024[[package]]2449[[package]]
2025name = "kvdb-memorydb"2450name = "kvdb-memorydb"
2026version = "0.6.0"2451version = "0.7.0"
2027source = "registry+https://github.com/rust-lang/crates.io-index"2452source = "registry+https://github.com/rust-lang/crates.io-index"
2028checksum = "73027d5e228de6f503b5b7335d530404fc26230a6ae3e09b33ec6e45408509a4"2453checksum = "73de822b260a3bdfb889dbbb65bb2d473eee2253973d6fa4a5d149a2a4a7c66e"
2029dependencies = [2454dependencies = [
2030 "kvdb",2455 "kvdb",
2031 "parity-util-mem",2456 "parity-util-mem",
20342459
2035[[package]]2460[[package]]
2036name = "kvdb-rocksdb"2461name = "kvdb-rocksdb"
2037version = "0.8.0"2462version = "0.9.1"
2038source = "registry+https://github.com/rust-lang/crates.io-index"2463source = "registry+https://github.com/rust-lang/crates.io-index"
2039checksum = "84384eca250c7ff67877eda5336f28a86586aaee24acb945643590671f6bfce1"2464checksum = "44947dd392f09475af614d740fe0320b66d01cb5b977f664bbbb5e45a70ea4c1"
2040dependencies = [2465dependencies = [
2041 "fs-swap",2466 "fs-swap",
2042 "kvdb",2467 "kvdb",
2047 "parking_lot 0.10.2",2472 "parking_lot 0.10.2",
2048 "regex",2473 "regex",
2049 "rocksdb",2474 "rocksdb",
2050 "smallvec 1.4.1",2475 "smallvec 1.4.2",
2051]2476]
20522477
2053[[package]]2478[[package]]
20582483
2059[[package]]2484[[package]]
2060name = "lazycell"2485name = "lazycell"
2061version = "1.2.1"2486version = "1.3.0"
2062source = "registry+https://github.com/rust-lang/crates.io-index"2487source = "registry+https://github.com/rust-lang/crates.io-index"
2063checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"2488checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
20642489
2065[[package]]2490[[package]]
2066name = "libc"2491name = "leb128"
2067version = "0.2.73"2492version = "0.2.4"
2068source = "registry+https://github.com/rust-lang/crates.io-index"2493source = "registry+https://github.com/rust-lang/crates.io-index"
2069checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9"2494checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a"
20702495
2071[[package]]2496[[package]]
2072name = "libflate"2497name = "libc"
2073version = "1.0.2"2498version = "0.2.79"
2074source = "registry+https://github.com/rust-lang/crates.io-index"2499source = "registry+https://github.com/rust-lang/crates.io-index"
2075checksum = "e9bac9023e1db29c084f9f8cd9d3852e5e8fddf98fb47c4964a0ea4663d95949"2500checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743"
2076dependencies = [
2077 "adler32",
2078 "crc32fast",
2079 "libflate_lz77",
2080 "rle-decode-fast",
2081]
2082
2083[[package]]
2084name = "libflate_lz77"
2085version = "1.0.0"
2086source = "registry+https://github.com/rust-lang/crates.io-index"
2087checksum = "3286f09f7d4926fc486334f28d8d2e6ebe4f7f9994494b6dab27ddfad2c9b11b"
20882501
2089[[package]]2502[[package]]
2090name = "libloading"2503name = "libloading"
21042517
2105[[package]]2518[[package]]
2106name = "libp2p"2519name = "libp2p"
2107version = "0.19.1"2520version = "0.28.1"
2108source = "registry+https://github.com/rust-lang/crates.io-index"2521source = "registry+https://github.com/rust-lang/crates.io-index"
2109checksum = "057eba5432d3e740e313c6e13c9153d0cb76b4f71bfc2e5242ae5bdb7d41af67"2522checksum = "571f5a4604c1a40d75651da141dfde29ad15329f537a779528803297d2220274"
2110dependencies = [2523dependencies = [
2524 "atomic",
2111 "bytes 0.5.6",2525 "bytes 0.5.6",
2112 "futures 0.3.5",2526 "futures 0.3.6",
2113 "lazy_static",2527 "lazy_static",
2114 "libp2p-core",2528 "libp2p-core",
2115 "libp2p-core-derive",2529 "libp2p-core-derive",
2530 "libp2p-deflate",
2116 "libp2p-dns",2531 "libp2p-dns",
2532 "libp2p-floodsub",
2533 "libp2p-gossipsub",
2117 "libp2p-identify",2534 "libp2p-identify",
2118 "libp2p-kad",2535 "libp2p-kad",
2119 "libp2p-mdns",2536 "libp2p-mdns",
2120 "libp2p-mplex",2537 "libp2p-mplex",
2121 "libp2p-noise",2538 "libp2p-noise",
2122 "libp2p-ping",2539 "libp2p-ping",
2540 "libp2p-plaintext",
2541 "libp2p-pnet",
2542 "libp2p-request-response",
2123 "libp2p-swarm",2543 "libp2p-swarm",
2124 "libp2p-tcp",2544 "libp2p-tcp",
2545 "libp2p-uds",
2125 "libp2p-wasm-ext",2546 "libp2p-wasm-ext",
2126 "libp2p-websocket",2547 "libp2p-websocket",
2127 "libp2p-yamux",2548 "libp2p-yamux",
2128 "multihash",2549 "multihash",
2129 "parity-multiaddr 0.9.1",2550 "parity-multiaddr",
2130 "parking_lot 0.10.2",2551 "parking_lot 0.10.2",
2131 "pin-project",2552 "pin-project",
2132 "smallvec 1.4.1",2553 "smallvec 1.4.2",
2133 "wasm-timer",2554 "wasm-timer",
2134]2555]
21352556
2136[[package]]2557[[package]]
2137name = "libp2p-core"2558name = "libp2p-core"
2138version = "0.19.2"2559version = "0.22.1"
2139source = "registry+https://github.com/rust-lang/crates.io-index"2560source = "registry+https://github.com/rust-lang/crates.io-index"
2140checksum = "3a0387b930c3d4c2533dc4893c1e0394185ddcc019846121b1b27491e45a2c08"2561checksum = "52f13ba8c7df0768af2eb391696d562c7de88cc3a35122531aaa6a7d77754d25"
2141dependencies = [2562dependencies = [
2142 "asn1_der",2563 "asn1_der",
2143 "bs58",2564 "bs58",
2144 "ed25519-dalek",2565 "ed25519-dalek",
2145 "either",2566 "either",
2146 "fnv",2567 "fnv",
2147 "futures 0.3.5",2568 "futures 0.3.6",
2148 "futures-timer 3.0.2",2569 "futures-timer 3.0.2",
2149 "lazy_static",2570 "lazy_static",
2150 "libsecp256k1",2571 "libsecp256k1",
2151 "log",2572 "log",
2152 "multihash",2573 "multihash",
2153 "multistream-select",2574 "multistream-select",
2154 "parity-multiaddr 0.9.1",2575 "parity-multiaddr",
2155 "parking_lot 0.10.2",2576 "parking_lot 0.10.2",
2156 "pin-project",2577 "pin-project",
2157 "prost",2578 "prost",
2160 "ring",2581 "ring",
2161 "rw-stream-sink",2582 "rw-stream-sink",
2162 "sha2 0.8.2",2583 "sha2 0.8.2",
2163 "smallvec 1.4.1",2584 "smallvec 1.4.2",
2164 "thiserror",2585 "thiserror",
2165 "unsigned-varint 0.4.0",2586 "unsigned-varint 0.4.0",
2166 "void",2587 "void",
21692590
2170[[package]]2591[[package]]
2171name = "libp2p-core-derive"2592name = "libp2p-core-derive"
2172version = "0.19.1"2593version = "0.20.2"
2173source = "registry+https://github.com/rust-lang/crates.io-index"2594source = "registry+https://github.com/rust-lang/crates.io-index"
2174checksum = "f09548626b737ed64080fde595e06ce1117795b8b9fc4d2629fa36561c583171"2595checksum = "f753d9324cd3ec14bf04b8a8cd0d269c87f294153d6bf2a84497a63a5ad22213"
2175dependencies = [2596dependencies = [
2176 "quote 1.0.7",2597 "quote",
2177 "syn 1.0.34",2598 "syn",
2178]2599]
2600
2601[[package]]
2602name = "libp2p-deflate"
2603version = "0.22.0"
2604source = "registry+https://github.com/rust-lang/crates.io-index"
2605checksum = "74029ae187f35f4b8ddf26b9779a68b340045d708528a103917cdca49a296db5"
2606dependencies = [
2607 "flate2",
2608 "futures 0.3.6",
2609 "libp2p-core",
2610]
21792611
2180[[package]]2612[[package]]
2181name = "libp2p-dns"2613name = "libp2p-dns"
2182version = "0.19.0"2614version = "0.22.0"
2183source = "registry+https://github.com/rust-lang/crates.io-index"2615source = "registry+https://github.com/rust-lang/crates.io-index"
2184checksum = "3cc186d9a941fd0207cf8f08ef225a735e2d7296258f570155e525f6ee732f87"2616checksum = "7cf319822e08dd65c8e060d2354e9f952895bbc433f5706c75ed010c152aee5e"
2185dependencies = [2617dependencies = [
2186 "futures 0.3.5",2618 "futures 0.3.6",
2187 "libp2p-core",2619 "libp2p-core",
2188 "log",2620 "log",
2189]2621]
2622
2623[[package]]
2624name = "libp2p-floodsub"
2625version = "0.22.0"
2626source = "registry+https://github.com/rust-lang/crates.io-index"
2627checksum = "d8a9acb43a3e4a4e413e0c4abe0fa49308df7c6335c88534757b647199cb8a51"
2628dependencies = [
2629 "cuckoofilter",
2630 "fnv",
2631 "futures 0.3.6",
2632 "libp2p-core",
2633 "libp2p-swarm",
2634 "prost",
2635 "prost-build",
2636 "rand 0.7.3",
2637 "smallvec 1.4.2",
2638]
2639
2640[[package]]
2641name = "libp2p-gossipsub"
2642version = "0.22.0"
2643source = "registry+https://github.com/rust-lang/crates.io-index"
2644checksum = "ab20fcb60edebe3173bbb708c6ac3444afdf1e3152dc2866b10c4f5497f17467"
2645dependencies = [
2646 "base64 0.11.0",
2647 "byteorder 1.3.4",
2648 "bytes 0.5.6",
2649 "fnv",
2650 "futures 0.3.6",
2651 "futures_codec",
2652 "hex_fmt",
2653 "libp2p-core",
2654 "libp2p-swarm",
2655 "log",
2656 "lru_time_cache",
2657 "prost",
2658 "prost-build",
2659 "rand 0.7.3",
2660 "sha2 0.8.2",
2661 "smallvec 1.4.2",
2662 "unsigned-varint 0.4.0",
2663 "wasm-timer",
2664]
21902665
2191[[package]]2666[[package]]
2192name = "libp2p-identify"2667name = "libp2p-identify"
2193version = "0.19.2"2668version = "0.22.0"
2194source = "registry+https://github.com/rust-lang/crates.io-index"2669source = "registry+https://github.com/rust-lang/crates.io-index"
2195checksum = "62f76075b170d908bae616f550ade410d9d27c013fa69042551dbfc757c7c094"2670checksum = "56396ee63aa9164eacf40c2c5d2bda8c4133c2f57e1b0425d51d3a4e362583b1"
2196dependencies = [2671dependencies = [
2197 "futures 0.3.5",2672 "futures 0.3.6",
2198 "libp2p-core",2673 "libp2p-core",
2199 "libp2p-swarm",2674 "libp2p-swarm",
2200 "log",2675 "log",
2201 "prost",2676 "prost",
2202 "prost-build",2677 "prost-build",
2203 "smallvec 1.4.1",2678 "smallvec 1.4.2",
2204 "wasm-timer",2679 "wasm-timer",
2205]2680]
22062681
2207[[package]]2682[[package]]
2208name = "libp2p-kad"2683name = "libp2p-kad"
2209version = "0.19.0"2684version = "0.23.0"
2210source = "registry+https://github.com/rust-lang/crates.io-index"2685source = "registry+https://github.com/rust-lang/crates.io-index"
2211checksum = "41d6c1d5100973527ae70d82687465b17049c1b717a7964de38b8e65000878ff"2686checksum = "cc7fa9047f8b8f544278a35c2d9d45d3b2c1785f2d86d4e1629d6edf97be3955"
2212dependencies = [2687dependencies = [
2213 "arrayvec 0.5.1",2688 "arrayvec 0.5.1",
2214 "bytes 0.5.6",2689 "bytes 0.5.6",
2215 "either",2690 "either",
2216 "fnv",2691 "fnv",
2217 "futures 0.3.5",2692 "futures 0.3.6",
2218 "futures_codec 0.3.4",2693 "futures_codec",
2219 "libp2p-core",2694 "libp2p-core",
2220 "libp2p-swarm",2695 "libp2p-swarm",
2221 "log",2696 "log",
2224 "prost-build",2699 "prost-build",
2225 "rand 0.7.3",2700 "rand 0.7.3",
2226 "sha2 0.8.2",2701 "sha2 0.8.2",
2227 "smallvec 1.4.1",2702 "smallvec 1.4.2",
2228 "uint",2703 "uint",
2229 "unsigned-varint 0.3.3",2704 "unsigned-varint 0.4.0",
2230 "void",2705 "void",
2231 "wasm-timer",2706 "wasm-timer",
2232]2707]
22332708
2234[[package]]2709[[package]]
2235name = "libp2p-mdns"2710name = "libp2p-mdns"
2236version = "0.19.2"2711version = "0.22.0"
2237source = "registry+https://github.com/rust-lang/crates.io-index"2712source = "registry+https://github.com/rust-lang/crates.io-index"
2238checksum = "7f55b2d4b80986e5bf158270ab23268ec0e7f644ece5436fbaabc5155472f357"2713checksum = "3173b5a6b2f690c29ae07798d85b9441a131ac76ddae9015ef22905b623d0c69"
2239dependencies = [2714dependencies = [
2240 "async-std",2715 "async-std",
2241 "data-encoding",2716 "data-encoding",
2242 "dns-parser",2717 "dns-parser",
2243 "either",2718 "either",
2244 "futures 0.3.5",2719 "futures 0.3.6",
2245 "lazy_static",2720 "lazy_static",
2246 "libp2p-core",2721 "libp2p-core",
2247 "libp2p-swarm",2722 "libp2p-swarm",
2248 "log",2723 "log",
2249 "net2",2724 "net2",
2250 "rand 0.7.3",2725 "rand 0.7.3",
2251 "smallvec 1.4.1",2726 "smallvec 1.4.2",
2252 "void",2727 "void",
2253 "wasm-timer",2728 "wasm-timer",
2254]2729]
22552730
2256[[package]]2731[[package]]
2257name = "libp2p-mplex"2732name = "libp2p-mplex"
2258version = "0.19.2"2733version = "0.22.0"
2259source = "registry+https://github.com/rust-lang/crates.io-index"2734source = "registry+https://github.com/rust-lang/crates.io-index"
2260checksum = "be7d913a4cd57de2013257ec73f07d77bfce390b370023e2d59083e5ca079864"2735checksum = "8a73a799cc8410b36e40b8f4c4b6babbcb9efd3727111bf517876e4acfa612d3"
2261dependencies = [2736dependencies = [
2262 "bytes 0.5.6",2737 "bytes 0.5.6",
2263 "fnv",2738 "fnv",
2264 "futures 0.3.5",2739 "futures 0.3.6",
2265 "futures_codec 0.4.1",2740 "futures_codec",
2266 "libp2p-core",2741 "libp2p-core",
2267 "log",2742 "log",
2268 "parking_lot 0.10.2",2743 "parking_lot 0.10.2",
22712746
2272[[package]]2747[[package]]
2273name = "libp2p-noise"2748name = "libp2p-noise"
2274version = "0.19.1"2749version = "0.24.0"
2275source = "registry+https://github.com/rust-lang/crates.io-index"2750source = "registry+https://github.com/rust-lang/crates.io-index"
2276checksum = "a03db664653369f46ee03fcec483a378c20195089bb43a26cb9fb0058009ac88"2751checksum = "6ef6c490042f549fb1025f2892dfe6083d97a77558f450c1feebe748ca9eb15a"
2277dependencies = [2752dependencies = [
2753 "bytes 0.5.6",
2278 "curve25519-dalek",2754 "curve25519-dalek 2.1.0",
2279 "futures 0.3.5",2755 "futures 0.3.6",
2280 "lazy_static",2756 "lazy_static",
2281 "libp2p-core",2757 "libp2p-core",
2282 "log",2758 "log",
2286 "sha2 0.8.2",2762 "sha2 0.8.2",
2287 "snow",2763 "snow",
2288 "static_assertions",2764 "static_assertions",
2289 "x25519-dalek",2765 "x25519-dalek 0.6.0",
2290 "zeroize",2766 "zeroize",
2291]2767]
22922768
2293[[package]]2769[[package]]
2294name = "libp2p-ping"2770name = "libp2p-ping"
2295version = "0.19.3"2771version = "0.22.0"
2296source = "registry+https://github.com/rust-lang/crates.io-index"2772source = "registry+https://github.com/rust-lang/crates.io-index"
2297checksum = "b8dedd34e35a9728d52d59ef36a218e411359a353f9011b2574b86ee790978f6"2773checksum = "ad063c21dfcea4518ac9e8bd4119d33a5b26c41e674f602f41f05617a368a5c8"
2298dependencies = [2774dependencies = [
2299 "futures 0.3.5",2775 "futures 0.3.6",
2300 "libp2p-core",2776 "libp2p-core",
2301 "libp2p-swarm",2777 "libp2p-swarm",
2302 "log",2778 "log",
2305 "wasm-timer",2781 "wasm-timer",
2306]2782]
2783
2784[[package]]
2785name = "libp2p-plaintext"
2786version = "0.22.0"
2787source = "registry+https://github.com/rust-lang/crates.io-index"
2788checksum = "903a12e99c72dbebefea258de887982adeacc7025baa1ceb10b7fa9928f54791"
2789dependencies = [
2790 "bytes 0.5.6",
2791 "futures 0.3.6",
2792 "futures_codec",
2793 "libp2p-core",
2794 "log",
2795 "prost",
2796 "prost-build",
2797 "rw-stream-sink",
2798 "unsigned-varint 0.4.0",
2799 "void",
2800]
2801
2802[[package]]
2803name = "libp2p-pnet"
2804version = "0.19.1"
2805source = "registry+https://github.com/rust-lang/crates.io-index"
2806checksum = "37d0db10e139d22d7af0b23ed7949449ec86262798aa0fd01595abdbcb02dc87"
2807dependencies = [
2808 "futures 0.3.6",
2809 "log",
2810 "pin-project",
2811 "rand 0.7.3",
2812 "salsa20",
2813 "sha3 0.8.2",
2814]
2815
2816[[package]]
2817name = "libp2p-request-response"
2818version = "0.3.0"
2819source = "registry+https://github.com/rust-lang/crates.io-index"
2820checksum = "9c0c9e8a4cd69d97e9646c54313d007512f411aba8c5226cfcda16df6a6e84a3"
2821dependencies = [
2822 "async-trait",
2823 "bytes 0.5.6",
2824 "futures 0.3.6",
2825 "libp2p-core",
2826 "libp2p-swarm",
2827 "log",
2828 "lru 0.6.0",
2829 "minicbor",
2830 "rand 0.7.3",
2831 "smallvec 1.4.2",
2832 "unsigned-varint 0.5.1",
2833 "wasm-timer",
2834]
23072835
2308[[package]]2836[[package]]
2309name = "libp2p-swarm"2837name = "libp2p-swarm"
2310version = "0.19.1"2838version = "0.22.0"
2311source = "registry+https://github.com/rust-lang/crates.io-index"2839source = "registry+https://github.com/rust-lang/crates.io-index"
2312checksum = "ce53ff4d127cf8b39adf84dbd381ca32d49bd85788cee08e6669da2495993930"2840checksum = "7193e444210132237b81b755ec7fe53f1c4bd2f53cf719729b94c0c72eb6eaa1"
2313dependencies = [2841dependencies = [
2842 "either",
2314 "futures 0.3.5",2843 "futures 0.3.6",
2315 "libp2p-core",2844 "libp2p-core",
2316 "log",2845 "log",
2317 "rand 0.7.3",2846 "rand 0.7.3",
2318 "smallvec 1.4.1",2847 "smallvec 1.4.2",
2319 "void",2848 "void",
2320 "wasm-timer",2849 "wasm-timer",
2321]2850]
23222851
2323[[package]]2852[[package]]
2324name = "libp2p-tcp"2853name = "libp2p-tcp"
2325version = "0.19.2"2854version = "0.22.0"
2326source = "registry+https://github.com/rust-lang/crates.io-index"2855source = "registry+https://github.com/rust-lang/crates.io-index"
2327checksum = "9481500c5774c62e8c413e9535b3f33a0e3dbacf2da63b8d3056c686a9df4146"2856checksum = "44f42ec130d7a37a7e47bf4398026b7ad9185c08ed26972e2720f8b94112796f"
2328dependencies = [2857dependencies = [
2329 "async-std",2858 "async-std",
2330 "futures 0.3.5",2859 "futures 0.3.6",
2331 "futures-timer 3.0.2",2860 "futures-timer 3.0.2",
2332 "get_if_addrs",2861 "get_if_addrs",
2333 "ipnet",2862 "ipnet",
2336 "socket2",2865 "socket2",
2337]2866]
2867
2868[[package]]
2869name = "libp2p-uds"
2870version = "0.22.0"
2871source = "registry+https://github.com/rust-lang/crates.io-index"
2872checksum = "dea7acb0a034f70d7db94c300eba3f65c0f6298820105624088a9609c9974d77"
2873dependencies = [
2874 "async-std",
2875 "futures 0.3.6",
2876 "libp2p-core",
2877 "log",
2878]
23382879
2339[[package]]2880[[package]]
2340name = "libp2p-wasm-ext"2881name = "libp2p-wasm-ext"
2341version = "0.19.0"2882version = "0.22.0"
2342source = "registry+https://github.com/rust-lang/crates.io-index"2883source = "registry+https://github.com/rust-lang/crates.io-index"
2343checksum = "f59fdbb5706f2723ca108c088b1c7a37f735a8c328021f0508007162627e9885"2884checksum = "34c1faac6f92c21fbe155417957863ea822fba9e9fd5eb24c0912336a100e63f"
2344dependencies = [2885dependencies = [
2345 "futures 0.3.5",2886 "futures 0.3.6",
2346 "js-sys",2887 "js-sys",
2347 "libp2p-core",2888 "libp2p-core",
2348 "parity-send-wrapper",2889 "parity-send-wrapper",
23522893
2353[[package]]2894[[package]]
2354name = "libp2p-websocket"2895name = "libp2p-websocket"
2355version = "0.19.0"2896version = "0.23.0"
2356source = "registry+https://github.com/rust-lang/crates.io-index"2897source = "registry+https://github.com/rust-lang/crates.io-index"
2357checksum = "085fbe4c05c4116c2164ab4d5a521eb6e00516c444f61b3ee9f68c7b1e53580b"2898checksum = "d650534ebd99f48f6fa292ed5db10d30df2444943afde4407ceeddab8e513fca"
2358dependencies = [2899dependencies = [
2359 "async-tls",2900 "async-tls",
2360 "bytes 0.5.6",
2361 "either",2901 "either",
2362 "futures 0.3.5",2902 "futures 0.3.6",
2363 "libp2p-core",2903 "libp2p-core",
2364 "log",2904 "log",
2365 "quicksink",2905 "quicksink",
23732913
2374[[package]]2914[[package]]
2375name = "libp2p-yamux"2915name = "libp2p-yamux"
2376version = "0.19.1"2916version = "0.25.0"
2377source = "registry+https://github.com/rust-lang/crates.io-index"2917source = "registry+https://github.com/rust-lang/crates.io-index"
2378checksum = "8da33e7b5f49c75c6a8afb0b8d1e229f5fa48be9f39bd14cdbc21459a02ac6fc"2918checksum = "781d9b9f043dcdabc40640807125368596b849fd4d96cdca2dcf052fdf6f33fd"
2379dependencies = [2919dependencies = [
2380 "futures 0.3.5",2920 "futures 0.3.6",
2381 "libp2p-core",2921 "libp2p-core",
2382 "parking_lot 0.10.2",2922 "parking_lot 0.11.0",
2383 "thiserror",2923 "thiserror",
2384 "yamux",2924 "yamux",
2385]2925]
23862926
2387[[package]]2927[[package]]
2388name = "librocksdb-sys"2928name = "librocksdb-sys"
2389version = "6.7.4"2929version = "6.11.4"
2390source = "registry+https://github.com/rust-lang/crates.io-index"2930source = "registry+https://github.com/rust-lang/crates.io-index"
2391checksum = "883213ae3d09bfc3d104aefe94b25ebb183b6f4d3a515b23b14817e1f4854005"2931checksum = "eb5b56f651c204634b936be2f92dbb42c36867e00ff7fe2405591f3b9fa66f09"
2392dependencies = [2932dependencies = [
2393 "bindgen",2933 "bindgen",
2394 "cc",2934 "cc",
2408 "hmac-drbg",2948 "hmac-drbg",
2409 "rand 0.7.3",2949 "rand 0.7.3",
2410 "sha2 0.8.2",2950 "sha2 0.8.2",
2411 "subtle 2.2.3",2951 "subtle 2.3.0",
2412 "typenum",2952 "typenum",
2413]2953]
24142954
2415[[package]]2955[[package]]
2416name = "libz-sys"2956name = "libz-sys"
2417version = "1.0.25"2957version = "1.1.2"
2418source = "registry+https://github.com/rust-lang/crates.io-index"2958source = "registry+https://github.com/rust-lang/crates.io-index"
2419checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"2959checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
2420dependencies = [2960dependencies = [
2421 "cc",2961 "cc",
2422 "libc",
2423 "pkg-config",2962 "pkg-config",
2424 "vcpkg",2963 "vcpkg",
2425]2964]
24322971
2433[[package]]2972[[package]]
2434name = "linked_hash_set"2973name = "linked_hash_set"
2435version = "0.1.3"2974version = "0.1.4"
2436source = "registry+https://github.com/rust-lang/crates.io-index"2975source = "registry+https://github.com/rust-lang/crates.io-index"
2437checksum = "3c7c91c4c7bbeb4f2f7c4e5be11e6a05bd6830bc37249c47ce1ad86ad453ff9c"2976checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588"
2438dependencies = [2977dependencies = [
2439 "linked-hash-map",2978 "linked-hash-map",
2440]2979]
2450 "statrs",2989 "statrs",
2451]2990]
2991
2992[[package]]
2993name = "lock_api"
2994version = "0.1.5"
2995source = "registry+https://github.com/rust-lang/crates.io-index"
2996checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
2997dependencies = [
2998 "scopeguard 0.3.3",
2999]
24523000
2453[[package]]3001[[package]]
2454name = "lock_api"3002name = "lock_api"
2455version = "0.3.4"3003version = "0.3.4"
2456source = "registry+https://github.com/rust-lang/crates.io-index"3004source = "registry+https://github.com/rust-lang/crates.io-index"
2457checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"3005checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
2458dependencies = [3006dependencies = [
2459 "scopeguard",3007 "scopeguard 1.1.0",
2460]3008]
3009
3010[[package]]
3011name = "lock_api"
3012version = "0.4.1"
3013source = "registry+https://github.com/rust-lang/crates.io-index"
3014checksum = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c"
3015dependencies = [
3016 "scopeguard 1.1.0",
3017]
24613018
2462[[package]]3019[[package]]
2463name = "log"3020name = "log"
2464version = "0.4.11"3021version = "0.4.11"
2465source = "registry+https://github.com/rust-lang/crates.io-index"3022source = "registry+https://github.com/rust-lang/crates.io-index"
2466checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"3023checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
2467dependencies = [3024dependencies = [
2468 "cfg-if",3025 "cfg-if 0.1.10",
2469]3026]
24703027
2471[[package]]3028[[package]]
2477 "hashbrown 0.6.3",3034 "hashbrown 0.6.3",
2478]3035]
3036
3037[[package]]
3038name = "lru"
3039version = "0.6.0"
3040source = "registry+https://github.com/rust-lang/crates.io-index"
3041checksum = "111b945ac72ec09eb7bc62a0fbdc3cc6e80555a7245f52a69d3921a75b53b153"
3042dependencies = [
3043 "hashbrown 0.8.2",
3044]
3045
3046[[package]]
3047name = "lru_time_cache"
3048version = "0.10.0"
3049source = "registry+https://github.com/rust-lang/crates.io-index"
3050checksum = "adb241df5c4caeb888755363fc95f8a896618dc0d435e9e775f7930cb099beab"
3051
3052[[package]]
3053name = "mach"
3054version = "0.3.2"
3055source = "registry+https://github.com/rust-lang/crates.io-index"
3056checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
3057dependencies = [
3058 "libc",
3059]
3060
3061[[package]]
3062name = "matchers"
3063version = "0.0.1"
3064source = "registry+https://github.com/rust-lang/crates.io-index"
3065checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"
3066dependencies = [
3067 "regex-automata",
3068]
24793069
2480[[package]]3070[[package]]
2481name = "matches"3071name = "matches"
25163106
2517[[package]]3107[[package]]
2518name = "memoffset"3108name = "memoffset"
2519version = "0.5.5"3109version = "0.5.6"
2520source = "registry+https://github.com/rust-lang/crates.io-index"3110source = "registry+https://github.com/rust-lang/crates.io-index"
2521checksum = "c198b026e1bbf08a937e94c6c60f9ec4a2267f5b0d2eec9c1b21b061ce2be55f"3111checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa"
2522dependencies = [3112dependencies = [
2523 "autocfg 1.0.0",3113 "autocfg 1.0.1",
2524]3114]
25253115
2526[[package]]3116[[package]]
2527name = "memory-db"3117name = "memory-db"
2528version = "0.21.0"3118version = "0.24.1"
2529source = "registry+https://github.com/rust-lang/crates.io-index"3119source = "registry+https://github.com/rust-lang/crates.io-index"
2530checksum = "fb2999ff7a65d5a1d72172f6d51fa2ea03024b51aee709ba5ff81c3c629a2410"3120checksum = "36f36ddb0b2cdc25d38babba472108798e3477f02be5165f038c5e393e50c57a"
2531dependencies = [3121dependencies = [
2532 "ahash",
2533 "hash-db",3122 "hash-db",
2534 "hashbrown 0.6.3",3123 "hashbrown 0.8.2",
2535 "parity-util-mem",3124 "parity-util-mem",
2536]3125]
25373126
2547source = "registry+https://github.com/rust-lang/crates.io-index"3136source = "registry+https://github.com/rust-lang/crates.io-index"
2548checksum = "c6feca46f4fa3443a01769d768727f10c10a20fdb65e52dc16a81f0c8269bb78"3137checksum = "c6feca46f4fa3443a01769d768727f10c10a20fdb65e52dc16a81f0c8269bb78"
2549dependencies = [3138dependencies = [
2550 "byteorder",3139 "byteorder 1.3.4",
2551 "keccak",3140 "keccak",
2552 "rand_core 0.5.1",3141 "rand_core 0.5.1",
2553 "zeroize",3142 "zeroize",
2554]3143]
3144
3145[[package]]
3146name = "minicbor"
3147version = "0.5.1"
3148source = "registry+https://github.com/rust-lang/crates.io-index"
3149checksum = "2fc03ad6f8f548db7194a5ff5a6f96342ecae4e3ef67d2bf18bacc0e245cd041"
3150dependencies = [
3151 "minicbor-derive",
3152]
3153
3154[[package]]
3155name = "minicbor-derive"
3156version = "0.4.1"
3157source = "registry+https://github.com/rust-lang/crates.io-index"
3158checksum = "c214bf3d90099b52f3e4b328ae0fe34837fd0fab683ad1e10fceb4629106df48"
3159dependencies = [
3160 "proc-macro2",
3161 "quote",
3162 "syn",
3163]
25553164
2556[[package]]3165[[package]]
2557name = "miniz_oxide"3166name = "miniz_oxide"
2558version = "0.4.0"3167version = "0.4.3"
2559source = "registry+https://github.com/rust-lang/crates.io-index"3168source = "registry+https://github.com/rust-lang/crates.io-index"
2560checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f"3169checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d"
2561dependencies = [3170dependencies = [
2562 "adler",3171 "adler",
3172 "autocfg 1.0.1",
2563]3173]
25643174
2565[[package]]3175[[package]]
2568source = "registry+https://github.com/rust-lang/crates.io-index"3178source = "registry+https://github.com/rust-lang/crates.io-index"
2569checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430"3179checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430"
2570dependencies = [3180dependencies = [
2571 "cfg-if",3181 "cfg-if 0.1.10",
2572 "fuchsia-zircon",3182 "fuchsia-zircon",
2573 "fuchsia-zircon-sys",3183 "fuchsia-zircon-sys",
2574 "iovec",3184 "iovec",
2638 "winapi 0.3.9",3248 "winapi 0.3.9",
2639]3249]
3250
3251[[package]]
3252name = "more-asserts"
3253version = "0.2.1"
3254source = "registry+https://github.com/rust-lang/crates.io-index"
3255checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238"
26403256
2641[[package]]3257[[package]]
2642name = "multihash"3258name = "multihash"
2643version = "0.11.2"3259version = "0.11.4"
2644source = "registry+https://github.com/rust-lang/crates.io-index"3260source = "registry+https://github.com/rust-lang/crates.io-index"
2645checksum = "f75db05d738947aa5389863aadafbcf2e509d7ba099dc2ddcdf4fc66bf7a9e03"3261checksum = "567122ab6492f49b59def14ecc36e13e64dca4188196dd0cd41f9f3f979f3df6"
2646dependencies = [3262dependencies = [
2647 "blake2b_simd",3263 "blake2b_simd",
2648 "blake2s_simd",3264 "blake2s_simd",
2649 "digest 0.8.1",3265 "digest 0.9.0",
2650 "sha-1",3266 "sha-1 0.9.1",
2651 "sha2 0.8.2",3267 "sha2 0.9.1",
2652 "sha3",3268 "sha3 0.9.1",
2653 "unsigned-varint 0.3.3",3269 "unsigned-varint 0.5.1",
2654]3270]
26553271
2656[[package]]3272[[package]]
2657name = "multimap"3273name = "multimap"
2658version = "0.8.1"3274version = "0.8.2"
2659source = "registry+https://github.com/rust-lang/crates.io-index"3275source = "registry+https://github.com/rust-lang/crates.io-index"
2660checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce"3276checksum = "1255076139a83bb467426e7f8d0134968a8118844faa755985e077cf31850333"
26613277
2662[[package]]3278[[package]]
2663name = "multistream-select"3279name = "multistream-select"
2666checksum = "c9157e87afbc2ef0d84cc0345423d715f445edde00141c93721c162de35a05e5"3282checksum = "c9157e87afbc2ef0d84cc0345423d715f445edde00141c93721c162de35a05e5"
2667dependencies = [3283dependencies = [
2668 "bytes 0.5.6",3284 "bytes 0.5.6",
2669 "futures 0.3.5",3285 "futures 0.3.6",
2670 "log",3286 "log",
2671 "pin-project",3287 "pin-project",
2672 "smallvec 1.4.1",3288 "smallvec 1.4.2",
2673 "unsigned-varint 0.4.0",3289 "unsigned-varint 0.4.0",
2674]3290]
26753291
2685 "matrixmultiply",3301 "matrixmultiply",
2686 "num-complex",3302 "num-complex",
2687 "num-rational",3303 "num-rational",
2688 "num-traits 0.2.12",3304 "num-traits",
2689 "rand 0.6.5",3305 "rand 0.6.5",
2690 "typenum",3306 "typenum",
2691]3307]
2700]3316]
27013317
2702[[package]]3318[[package]]
2703name = "net2"3319name = "nb-connect"
2704version = "0.2.34"3320version = "1.0.2"
2705source = "registry+https://github.com/rust-lang/crates.io-index"3321source = "registry+https://github.com/rust-lang/crates.io-index"
2706checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7"3322checksum = "8123a81538e457d44b933a02faf885d3fe8408806b23fa700e8f01c6c3a98998"
2707dependencies = [3323dependencies = [
2708 "cfg-if",
2709 "libc",3324 "libc",
2710 "winapi 0.3.9",3325 "winapi 0.3.9",
2711]3326]
27123327
2713[[package]]3328[[package]]
2714name = "netstat2"3329name = "net2"
2715version = "0.8.1"3330version = "0.2.35"
2716source = "registry+https://github.com/rust-lang/crates.io-index"3331source = "registry+https://github.com/rust-lang/crates.io-index"
2717checksum = "29449d242064c48d3057a194b049a2bdcccadda16faa18a91468677b44e8d422"3332checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853"
2718dependencies = [3333dependencies = [
2719 "bitflags",3334 "cfg-if 0.1.10",
2720 "byteorder",
2721 "enum-primitive-derive",
2722 "libc",3335 "libc",
2723 "num-traits 0.2.12",3336 "winapi 0.3.9",
2724 "thiserror",
2725]3337]
27263338
2727[[package]]3339[[package]]
2728name = "nft"3340name = "nft"
2729version = "2.0.0-rc4"3341version = "2.0.0"
2730dependencies = [3342dependencies = [
3343 "frame-benchmarking",
3344 "frame-benchmarking-cli",
2731 "futures 0.3.5",3345 "futures 0.3.6",
2732 "jsonrpc-core",3346 "jsonrpc-core",
2733 "log",3347 "log",
2734 "nft-runtime",3348 "nft-runtime",
2735 "pallet-contracts-rpc",3349 "pallet-contracts-rpc",
3350 "pallet-transaction-payment-rpc",
2736 "parking_lot 0.10.2",3351 "parking_lot 0.10.2",
2737 "sc-basic-authorship",3352 "sc-basic-authorship",
2738 "sc-cli",3353 "sc-cli",
2743 "sc-finality-grandpa",3358 "sc-finality-grandpa",
2744 "sc-network",3359 "sc-network",
2745 "sc-rpc",3360 "sc-rpc",
3361 "sc-rpc-api",
2746 "sc-service",3362 "sc-service",
2747 "sc-transaction-pool",3363 "sc-transaction-pool",
3364 "sp-api",
3365 "sp-block-builder",
3366 "sp-blockchain",
2748 "sp-consensus",3367 "sp-consensus",
2749 "sp-consensus-aura",3368 "sp-consensus-aura",
2750 "sp-core",3369 "sp-core",
2754 "sp-transaction-pool",3373 "sp-transaction-pool",
2755 "structopt",3374 "structopt",
2756 "substrate-build-script-utils",3375 "substrate-build-script-utils",
3376 "substrate-frame-rpc-system",
2757]3377]
27583378
2759[[package]]3379[[package]]
2760name = "nft-runtime"3380name = "nft-runtime"
2761version = "2.0.0-rc4"3381version = "2.0.0"
2762dependencies = [3382dependencies = [
3383 "frame-benchmarking",
2763 "frame-executive",3384 "frame-executive",
2764 "frame-support",3385 "frame-support",
2765 "frame-system",3386 "frame-system",
3387 "frame-system-benchmarking",
3388 "frame-system-rpc-runtime-api",
3389 "hex-literal",
2766 "pallet-aura",3390 "pallet-aura",
2767 "pallet-balances",3391 "pallet-balances",
2768 "pallet-contracts",3392 "pallet-contracts",
2774 "pallet-sudo",3398 "pallet-sudo",
2775 "pallet-timestamp",3399 "pallet-timestamp",
2776 "pallet-transaction-payment",3400 "pallet-transaction-payment",
3401 "pallet-transaction-payment-rpc-runtime-api",
2777 "parity-scale-codec",3402 "parity-scale-codec",
2778 "serde",3403 "serde",
2779 "sp-api",3404 "sp-api",
2780 "sp-block-builder",3405 "sp-block-builder",
2781 "sp-consensus-aura",3406 "sp-consensus-aura",
2782 "sp-core",3407 "sp-core",
2783 "sp-inherents",3408 "sp-inherents",
2784 "sp-io",
2785 "sp-offchain",3409 "sp-offchain",
2786 "sp-runtime",3410 "sp-runtime",
2787 "sp-session",3411 "sp-session",
2799dependencies = [3423dependencies = [
2800 "bitflags",3424 "bitflags",
2801 "cc",3425 "cc",
2802 "cfg-if",3426 "cfg-if 0.1.10",
2803 "libc",3427 "libc",
2804 "void",3428 "void",
2805]3429]
2826 "version_check",3450 "version_check",
2827]3451]
2828
2829[[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]
28373452
2838[[package]]3453[[package]]
2839name = "num-bigint"3454name = "num-bigint"
2840version = "0.2.6"3455version = "0.2.6"
2841source = "registry+https://github.com/rust-lang/crates.io-index"3456source = "registry+https://github.com/rust-lang/crates.io-index"
2842checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"3457checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"
2843dependencies = [3458dependencies = [
2844 "autocfg 1.0.0",3459 "autocfg 1.0.1",
2845 "num-integer",3460 "num-integer",
2846 "num-traits 0.2.12",3461 "num-traits",
2847]3462]
28483463
2849[[package]]3464[[package]]
2852source = "registry+https://github.com/rust-lang/crates.io-index"3467source = "registry+https://github.com/rust-lang/crates.io-index"
2853checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"3468checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"
2854dependencies = [3469dependencies = [
2855 "autocfg 1.0.0",3470 "autocfg 1.0.1",
2856 "num-traits 0.2.12",3471 "num-traits",
2857]3472]
28583473
2859[[package]]3474[[package]]
2862source = "registry+https://github.com/rust-lang/crates.io-index"3477source = "registry+https://github.com/rust-lang/crates.io-index"
2863checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b"3478checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b"
2864dependencies = [3479dependencies = [
2865 "autocfg 1.0.0",3480 "autocfg 1.0.1",
2866 "num-traits 0.2.12",3481 "num-traits",
2867]3482]
28683483
2869[[package]]3484[[package]]
2872source = "registry+https://github.com/rust-lang/crates.io-index"3487source = "registry+https://github.com/rust-lang/crates.io-index"
2873checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef"3488checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef"
2874dependencies = [3489dependencies = [
2875 "autocfg 1.0.0",3490 "autocfg 1.0.1",
2876 "num-bigint",3491 "num-bigint",
2877 "num-integer",3492 "num-integer",
2878 "num-traits 0.2.12",3493 "num-traits",
2879]3494]
2880
2881[[package]]
2882name = "num-traits"
2883version = "0.1.43"
2884source = "registry+https://github.com/rust-lang/crates.io-index"
2885checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
2886dependencies = [
2887 "num-traits 0.2.12",
2888]
28893495
2890[[package]]3496[[package]]
2891name = "num-traits"3497name = "num-traits"
2892version = "0.2.12"3498version = "0.2.12"
2893source = "registry+https://github.com/rust-lang/crates.io-index"3499source = "registry+https://github.com/rust-lang/crates.io-index"
2894checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611"3500checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611"
2895dependencies = [3501dependencies = [
2896 "autocfg 1.0.0",3502 "autocfg 1.0.1",
2897 "libm",3503 "libm",
2898]3504]
28993505
2907 "libc",3513 "libc",
2908]3514]
3515
3516[[package]]
3517name = "object"
3518version = "0.19.0"
3519source = "registry+https://github.com/rust-lang/crates.io-index"
3520checksum = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2"
29093521
2910[[package]]3522[[package]]
2911name = "object"3523name = "object"
2912version = "0.20.0"3524version = "0.20.0"
2913source = "registry+https://github.com/rust-lang/crates.io-index"3525source = "registry+https://github.com/rust-lang/crates.io-index"
2914checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5"3526checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5"
3527dependencies = [
3528 "crc32fast",
3529 "indexmap",
3530 "wasmparser 0.57.0",
3531]
3532
3533[[package]]
3534name = "object"
3535version = "0.21.1"
3536source = "registry+https://github.com/rust-lang/crates.io-index"
3537checksum = "37fd5004feb2ce328a52b0b3d01dbf4ffff72583493900ed15f22d4111c51693"
3538
3539[[package]]
3540name = "once_cell"
3541version = "0.1.8"
3542source = "registry+https://github.com/rust-lang/crates.io-index"
3543checksum = "532c29a261168a45ce28948f9537ddd7a5dd272cc513b3017b1e82a88f962c37"
3544dependencies = [
3545 "parking_lot 0.7.1",
3546]
29153547
2916[[package]]3548[[package]]
2917name = "once_cell"3549name = "once_cell"
2918version = "1.4.0"3550version = "1.4.1"
2919source = "registry+https://github.com/rust-lang/crates.io-index"3551source = "registry+https://github.com/rust-lang/crates.io-index"
2920checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d"3552checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad"
2921dependencies = [3553dependencies = [
2922 "parking_lot 0.10.2",3554 "parking_lot 0.11.0",
2923]3555]
29243556
2925[[package]]3557[[package]]
29513583
2952[[package]]3584[[package]]
2953name = "pallet-aura"3585name = "pallet-aura"
2954version = "2.0.0-rc4"3586version = "2.0.0"
2955source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3587source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
2956dependencies = [3588dependencies = [
2957 "frame-support",3589 "frame-support",
2958 "frame-system",3590 "frame-system",
2968 "sp-timestamp",3600 "sp-timestamp",
2969]3601]
3602
3603[[package]]
3604name = "pallet-authorship"
3605version = "2.0.0"
3606source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3607dependencies = [
3608 "frame-support",
3609 "frame-system",
3610 "impl-trait-for-tuples",
3611 "parity-scale-codec",
3612 "sp-authorship",
3613 "sp-inherents",
3614 "sp-runtime",
3615 "sp-std",
3616]
29703617
2971[[package]]3618[[package]]
2972name = "pallet-balances"3619name = "pallet-balances"
2973version = "2.0.0-rc4"3620version = "2.0.0"
2974source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3621source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
2975dependencies = [3622dependencies = [
2976 "frame-benchmarking",3623 "frame-benchmarking",
2977 "frame-support",3624 "frame-support",
29843631
2985[[package]]3632[[package]]
2986name = "pallet-contracts"3633name = "pallet-contracts"
2987version = "2.0.0-rc4"3634version = "2.0.0"
2988source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3635source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
2989dependencies = [3636dependencies = [
3637 "bitflags",
2990 "frame-support",3638 "frame-support",
2991 "frame-system",3639 "frame-system",
2992 "pallet-contracts-primitives",3640 "pallet-contracts-primitives",
30043652
3005[[package]]3653[[package]]
3006name = "pallet-contracts-primitives"3654name = "pallet-contracts-primitives"
3007version = "2.0.0-rc4"3655version = "2.0.0"
3008source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3656source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3009dependencies = [3657dependencies = [
3010 "parity-scale-codec",3658 "parity-scale-codec",
3011 "sp-runtime",3659 "sp-runtime",
30143662
3015[[package]]3663[[package]]
3016name = "pallet-contracts-rpc"3664name = "pallet-contracts-rpc"
3017version = "0.8.0-rc4"3665version = "0.8.0"
3018source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3666source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3019dependencies = [3667dependencies = [
3020 "jsonrpc-core",3668 "jsonrpc-core",
3021 "jsonrpc-core-client",3669 "jsonrpc-core-client",
30333681
3034[[package]]3682[[package]]
3035name = "pallet-contracts-rpc-runtime-api"3683name = "pallet-contracts-rpc-runtime-api"
3036version = "0.8.0-rc4"3684version = "0.8.0"
3037source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3685source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3038dependencies = [3686dependencies = [
3039 "pallet-contracts-primitives",3687 "pallet-contracts-primitives",
3040 "parity-scale-codec",3688 "parity-scale-codec",
30453693
3046[[package]]3694[[package]]
3047name = "pallet-finality-tracker"3695name = "pallet-finality-tracker"
3048version = "2.0.0-rc4"3696version = "2.0.0"
3049source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3697source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3050dependencies = [3698dependencies = [
3051 "frame-support",3699 "frame-support",
3052 "frame-system",3700 "frame-system",
30613709
3062[[package]]3710[[package]]
3063name = "pallet-grandpa"3711name = "pallet-grandpa"
3064version = "2.0.0-rc4"3712version = "2.0.0"
3065source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3713source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3066dependencies = [3714dependencies = [
3715 "frame-benchmarking",
3067 "frame-support",3716 "frame-support",
3068 "frame-system",3717 "frame-system",
3718 "pallet-authorship",
3069 "pallet-finality-tracker",3719 "pallet-finality-tracker",
3070 "pallet-session",3720 "pallet-session",
3071 "parity-scale-codec",3721 "parity-scale-codec",
30813731
3082[[package]]3732[[package]]
3083name = "pallet-nft"3733name = "pallet-nft"
3084version = "2.0.0-rc4"3734version = "2.0.0"
3085dependencies = [3735dependencies = [
3736 "frame-benchmarking",
3086 "frame-support",3737 "frame-support",
3087 "frame-system",3738 "frame-system",
3088 "log",3739 "log",
3740 "pallet-contracts",
3089 "pallet-transaction-payment",3741 "pallet-transaction-payment",
3090 "parity-scale-codec",3742 "parity-scale-codec",
3091 "serde",3743 "serde",
30973749
3098[[package]]3750[[package]]
3099name = "pallet-randomness-collective-flip"3751name = "pallet-randomness-collective-flip"
3100version = "2.0.0-rc4"3752version = "2.0.0"
3101source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3753source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3102dependencies = [3754dependencies = [
3103 "frame-support",3755 "frame-support",
3104 "frame-system",3756 "frame-system",
31103762
3111[[package]]3763[[package]]
3112name = "pallet-session"3764name = "pallet-session"
3113version = "2.0.0-rc4"3765version = "2.0.0"
3114source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3766source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3115dependencies = [3767dependencies = [
3116 "frame-support",3768 "frame-support",
3117 "frame-system",3769 "frame-system",
31303782
3131[[package]]3783[[package]]
3132name = "pallet-sudo"3784name = "pallet-sudo"
3133version = "2.0.0-rc4"3785version = "2.0.0"
3134source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3786source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3135dependencies = [3787dependencies = [
3136 "frame-support",3788 "frame-support",
3137 "frame-system",3789 "frame-system",
31443796
3145[[package]]3797[[package]]
3146name = "pallet-timestamp"3798name = "pallet-timestamp"
3147version = "2.0.0-rc4"3799version = "2.0.0"
3148source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3800source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3149dependencies = [3801dependencies = [
3150 "frame-benchmarking",3802 "frame-benchmarking",
3151 "frame-support",3803 "frame-support",
3154 "parity-scale-codec",3806 "parity-scale-codec",
3155 "serde",3807 "serde",
3156 "sp-inherents",3808 "sp-inherents",
3809 "sp-io",
3157 "sp-runtime",3810 "sp-runtime",
3158 "sp-std",3811 "sp-std",
3159 "sp-timestamp",3812 "sp-timestamp",
3160]3813]
31613814
3162[[package]]3815[[package]]
3163name = "pallet-transaction-payment"3816name = "pallet-transaction-payment"
3164version = "2.0.0-rc4"3817version = "2.0.0"
3165source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3818source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3166dependencies = [3819dependencies = [
3167 "frame-support",3820 "frame-support",
3168 "frame-system",3821 "frame-system",
3169 "pallet-transaction-payment-rpc-runtime-api",3822 "pallet-transaction-payment-rpc-runtime-api",
3170 "parity-scale-codec",3823 "parity-scale-codec",
3171 "serde",3824 "serde",
3172 "smallvec 1.4.1",3825 "smallvec 1.4.2",
3826 "sp-core",
3827 "sp-io",
3173 "sp-runtime",3828 "sp-runtime",
3174 "sp-std",3829 "sp-std",
3175]3830]
3831
3832[[package]]
3833name = "pallet-transaction-payment-rpc"
3834version = "2.0.0"
3835source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3836dependencies = [
3837 "jsonrpc-core",
3838 "jsonrpc-core-client",
3839 "jsonrpc-derive",
3840 "pallet-transaction-payment-rpc-runtime-api",
3841 "parity-scale-codec",
3842 "serde",
3843 "sp-api",
3844 "sp-blockchain",
3845 "sp-core",
3846 "sp-rpc",
3847 "sp-runtime",
3848]
31763849
3177[[package]]3850[[package]]
3178name = "pallet-transaction-payment-rpc-runtime-api"3851name = "pallet-transaction-payment-rpc-runtime-api"
3179version = "2.0.0-rc4"3852version = "2.0.0"
3180source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"3853source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
3181dependencies = [3854dependencies = [
3182 "frame-support",3855 "frame-support",
3183 "parity-scale-codec",3856 "parity-scale-codec",
3201 "parking_lot 0.10.2",3874 "parking_lot 0.10.2",
3202]3875]
3203
3204[[package]]
3205name = "parity-multiaddr"
3206version = "0.7.3"
3207source = "registry+https://github.com/rust-lang/crates.io-index"
3208checksum = "f77055f9e81921a8cc7bebeb6cded3d128931d51f1e3dd6251f0770a6d431477"
3209dependencies = [
3210 "arrayref",
3211 "bs58",
3212 "byteorder",
3213 "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]
32213876
3222[[package]]3877[[package]]
3223name = "parity-multiaddr"3878name = "parity-multiaddr"
3224version = "0.9.1"3879version = "0.9.2"
3225source = "registry+https://github.com/rust-lang/crates.io-index"3880source = "registry+https://github.com/rust-lang/crates.io-index"
3226checksum = "cc20af3143a62c16e7c9e92ea5c6ae49f7d271d97d4d8fe73afc28f0514a3d0f"3881checksum = "2165a93382a93de55868dcbfa11e4a8f99676a9164eee6a2b4a9479ad319c257"
3227dependencies = [3882dependencies = [
3228 "arrayref",3883 "arrayref",
3229 "bs58",3884 "bs58",
3230 "byteorder",3885 "byteorder 1.3.4",
3231 "data-encoding",3886 "data-encoding",
3232 "multihash",3887 "multihash",
3233 "percent-encoding 2.1.0",3888 "percent-encoding 2.1.0",
3237 "url 2.1.1",3892 "url 2.1.1",
3238]3893]
3239
3240[[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]
32543894
3255[[package]]3895[[package]]
3256name = "parity-scale-codec"3896name = "parity-scale-codec"
3257version = "1.3.1"3897version = "1.3.5"
3258source = "registry+https://github.com/rust-lang/crates.io-index"3898source = "registry+https://github.com/rust-lang/crates.io-index"
3259checksum = "a74f02beb35d47e0706155c9eac554b50c671e0d868fe8296bcdf44a9a4847bf"3899checksum = "7c740e5fbcb6847058b40ac7e5574766c6388f585e184d769910fe0d3a2ca861"
3260dependencies = [3900dependencies = [
3261 "arrayvec 0.5.1",3901 "arrayvec 0.5.1",
3262 "bitvec",3902 "bitvec",
32673907
3268[[package]]3908[[package]]
3269name = "parity-scale-codec-derive"3909name = "parity-scale-codec-derive"
3270version = "1.2.0"3910version = "1.2.2"
3271source = "registry+https://github.com/rust-lang/crates.io-index"3911source = "registry+https://github.com/rust-lang/crates.io-index"
3272checksum = "5a0ec292e92e8ec7c58e576adacc1e3f399c597c8f263c42f18420abe58e7245"3912checksum = "198db82bb1c18fc00176004462dd809b2a6d851669550aa17af6dacd21ae0c14"
3273dependencies = [3913dependencies = [
3274 "proc-macro-crate",3914 "proc-macro-crate",
3275 "proc-macro2",3915 "proc-macro2",
3276 "quote 1.0.7",3916 "quote",
3277 "syn 1.0.34",3917 "syn",
3278]3918]
32793919
3280[[package]]3920[[package]]
3290checksum = "1e57fea504fea33f9fbb5f49f378359030e7e026a6ab849bb9e8f0787376f1bf"3930checksum = "1e57fea504fea33f9fbb5f49f378359030e7e026a6ab849bb9e8f0787376f1bf"
3291dependencies = [3931dependencies = [
3292 "bytes 0.4.12",3932 "bytes 0.4.12",
3293 "futures 0.1.29",3933 "futures 0.1.30",
3294 "libc",3934 "libc",
3295 "log",3935 "log",
3296 "mio-named-pipes",3936 "mio-named-pipes",
33043944
3305[[package]]3945[[package]]
3306name = "parity-util-mem"3946name = "parity-util-mem"
3307version = "0.6.1"3947version = "0.7.0"
3308source = "registry+https://github.com/rust-lang/crates.io-index"3948source = "registry+https://github.com/rust-lang/crates.io-index"
3309checksum = "2c6e2583649a3ca84894d1d71da249abcfda54d5aca24733d72ca10d0f02361c"3949checksum = "297ff91fa36aec49ce183484b102f6b75b46776822bd81525bfc4cc9b0dd0f5c"
3310dependencies = [3950dependencies = [
3311 "cfg-if",3951 "cfg-if 0.1.10",
3952 "hashbrown 0.8.2",
3312 "impl-trait-for-tuples",3953 "impl-trait-for-tuples",
3313 "parity-util-mem-derive",3954 "parity-util-mem-derive",
3314 "parking_lot 0.10.2",3955 "parking_lot 0.10.2",
3315 "primitive-types",3956 "primitive-types",
3316 "smallvec 1.4.1",3957 "smallvec 1.4.2",
3317 "winapi 0.3.9",3958 "winapi 0.3.9",
3318]3959]
33193960
3324checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2"3965checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2"
3325dependencies = [3966dependencies = [
3326 "proc-macro2",3967 "proc-macro2",
3327 "syn 1.0.34",3968 "syn",
3328 "synstructure",3969 "synstructure",
3329]3970]
33303971
3334source = "registry+https://github.com/rust-lang/crates.io-index"3975source = "registry+https://github.com/rust-lang/crates.io-index"
3335checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865"3976checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865"
3977
3978[[package]]
3979name = "parity-ws"
3980version = "0.10.0"
3981source = "registry+https://github.com/rust-lang/crates.io-index"
3982checksum = "9e02a625dd75084c2a7024f07c575b61b782f729d18702dabb3cdbf31911dc61"
3983dependencies = [
3984 "byteorder 1.3.4",
3985 "bytes 0.4.12",
3986 "httparse",
3987 "log",
3988 "mio",
3989 "mio-extras",
3990 "rand 0.7.3",
3991 "sha-1 0.8.2",
3992 "slab",
3993 "url 2.1.1",
3994]
3995
3996[[package]]
3997name = "parking"
3998version = "2.0.0"
3999source = "registry+https://github.com/rust-lang/crates.io-index"
4000checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72"
4001
4002[[package]]
4003name = "parking_lot"
4004version = "0.7.1"
4005source = "registry+https://github.com/rust-lang/crates.io-index"
4006checksum = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337"
4007dependencies = [
4008 "lock_api 0.1.5",
4009 "parking_lot_core 0.4.0",
4010]
33364011
3337[[package]]4012[[package]]
3338name = "parking_lot"4013name = "parking_lot"
3339version = "0.9.0"4014version = "0.9.0"
3340source = "registry+https://github.com/rust-lang/crates.io-index"4015source = "registry+https://github.com/rust-lang/crates.io-index"
3341checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"4016checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
3342dependencies = [4017dependencies = [
3343 "lock_api",4018 "lock_api 0.3.4",
3344 "parking_lot_core 0.6.2",4019 "parking_lot_core 0.6.2",
3345 "rustc_version",4020 "rustc_version",
3346]4021]
3351source = "registry+https://github.com/rust-lang/crates.io-index"4026source = "registry+https://github.com/rust-lang/crates.io-index"
3352checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"4027checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e"
3353dependencies = [4028dependencies = [
3354 "lock_api",4029 "lock_api 0.3.4",
3355 "parking_lot_core 0.7.2",4030 "parking_lot_core 0.7.2",
3356]4031]
4032
4033[[package]]
4034name = "parking_lot"
4035version = "0.11.0"
4036source = "registry+https://github.com/rust-lang/crates.io-index"
4037checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733"
4038dependencies = [
4039 "instant",
4040 "lock_api 0.4.1",
4041 "parking_lot_core 0.8.0",
4042]
4043
4044[[package]]
4045name = "parking_lot_core"
4046version = "0.4.0"
4047source = "registry+https://github.com/rust-lang/crates.io-index"
4048checksum = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9"
4049dependencies = [
4050 "libc",
4051 "rand 0.6.5",
4052 "rustc_version",
4053 "smallvec 0.6.13",
4054 "winapi 0.3.9",
4055]
33574056
3358[[package]]4057[[package]]
3359name = "parking_lot_core"4058name = "parking_lot_core"
3360version = "0.6.2"4059version = "0.6.2"
3361source = "registry+https://github.com/rust-lang/crates.io-index"4060source = "registry+https://github.com/rust-lang/crates.io-index"
3362checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"4061checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b"
3363dependencies = [4062dependencies = [
3364 "cfg-if",4063 "cfg-if 0.1.10",
3365 "cloudabi",4064 "cloudabi 0.0.3",
3366 "libc",4065 "libc",
3367 "redox_syscall",4066 "redox_syscall",
3368 "rustc_version",4067 "rustc_version",
3376source = "registry+https://github.com/rust-lang/crates.io-index"4075source = "registry+https://github.com/rust-lang/crates.io-index"
3377checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"4076checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3"
3378dependencies = [4077dependencies = [
3379 "cfg-if",4078 "cfg-if 0.1.10",
3380 "cloudabi",4079 "cloudabi 0.0.3",
3381 "libc",4080 "libc",
3382 "redox_syscall",4081 "redox_syscall",
3383 "smallvec 1.4.1",4082 "smallvec 1.4.2",
3384 "winapi 0.3.9",4083 "winapi 0.3.9",
3385]4084]
4085
4086[[package]]
4087name = "parking_lot_core"
4088version = "0.8.0"
4089source = "registry+https://github.com/rust-lang/crates.io-index"
4090checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b"
4091dependencies = [
4092 "cfg-if 0.1.10",
4093 "cloudabi 0.1.0",
4094 "instant",
4095 "libc",
4096 "redox_syscall",
4097 "smallvec 1.4.2",
4098 "winapi 0.3.9",
4099]
33864100
3387[[package]]4101[[package]]
3388name = "paste"4102name = "paste"
3409source = "registry+https://github.com/rust-lang/crates.io-index"4123source = "registry+https://github.com/rust-lang/crates.io-index"
3410checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9"4124checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9"
3411dependencies = [4125dependencies = [
3412 "byteorder",4126 "byteorder 1.3.4",
3413 "crypto-mac 0.7.0",4127 "crypto-mac 0.7.0",
4128 "rayon",
3414]4129]
34154130
3416[[package]]4131[[package]]
34434158
3444[[package]]4159[[package]]
3445name = "pin-project"4160name = "pin-project"
3446version = "0.4.22"4161version = "0.4.27"
3447source = "registry+https://github.com/rust-lang/crates.io-index"4162source = "registry+https://github.com/rust-lang/crates.io-index"
3448checksum = "12e3a6cdbfe94a5e4572812a0201f8c0ed98c1c452c7b8563ce2276988ef9c17"4163checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15"
3449dependencies = [4164dependencies = [
3450 "pin-project-internal",4165 "pin-project-internal",
3451]4166]
34524167
3453[[package]]4168[[package]]
3454name = "pin-project-internal"4169name = "pin-project-internal"
3455version = "0.4.22"4170version = "0.4.27"
3456source = "registry+https://github.com/rust-lang/crates.io-index"4171source = "registry+https://github.com/rust-lang/crates.io-index"
3457checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7"4172checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895"
3458dependencies = [4173dependencies = [
3459 "proc-macro2",4174 "proc-macro2",
3460 "quote 1.0.7",4175 "quote",
3461 "syn 1.0.34",4176 "syn",
3462]4177]
34634178
3464[[package]]4179[[package]]
3465name = "pin-project-lite"4180name = "pin-project-lite"
3466version = "0.1.7"4181version = "0.1.10"
3467source = "registry+https://github.com/rust-lang/crates.io-index"4182source = "registry+https://github.com/rust-lang/crates.io-index"
3468checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715"4183checksum = "e555d9e657502182ac97b539fb3dae8b79cda19e3e4f8ffb5e8de4f18df93c95"
34694184
3470[[package]]4185[[package]]
3471name = "pin-utils"4186name = "pin-utils"
34754190
3476[[package]]4191[[package]]
3477name = "pkg-config"4192name = "pkg-config"
3478version = "0.3.18"4193version = "0.3.19"
3479source = "registry+https://github.com/rust-lang/crates.io-index"4194source = "registry+https://github.com/rust-lang/crates.io-index"
3480checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33"4195checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
34814196
3482[[package]]4197[[package]]
3483name = "platforms"4198name = "platforms"
3484version = "0.2.1"4199version = "0.2.1"
3485source = "registry+https://github.com/rust-lang/crates.io-index"4200source = "registry+https://github.com/rust-lang/crates.io-index"
3486checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e"4201checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e"
4202
4203[[package]]
4204name = "polling"
4205version = "2.0.1"
4206source = "registry+https://github.com/rust-lang/crates.io-index"
4207checksum = "ab773feb154f12c49ffcfd66ab8bdcf9a1843f950db48b0d8be9d4393783b058"
4208dependencies = [
4209 "cfg-if 0.1.10",
4210 "libc",
4211 "log",
4212 "wepoll-sys",
4213 "winapi 0.3.9",
4214]
34874215
3488[[package]]4216[[package]]
3489name = "poly1305"4217name = "poly1305"
3490version = "0.6.0"4218version = "0.6.1"
3491source = "registry+https://github.com/rust-lang/crates.io-index"4219source = "registry+https://github.com/rust-lang/crates.io-index"
3492checksum = "d9b42192ab143ed7619bf888a7f9c6733a9a2153b218e2cd557cfdb52fbf9bb1"4220checksum = "22ce46de8e53ee414ca4d02bfefac75d8c12fba948b76622a40b4be34dfce980"
3493dependencies = [4221dependencies = [
3494 "universal-hash",4222 "universal-hash",
3495]4223]
34964224
3497[[package]]4225[[package]]
3498name = "polyval"4226name = "polyval"
3499version = "0.4.0"4227version = "0.4.1"
3500source = "registry+https://github.com/rust-lang/crates.io-index"4228source = "registry+https://github.com/rust-lang/crates.io-index"
3501checksum = "d9a50142b55ab3ed0e9f68dfb3709f1d90d29da24e91033f28b96330643107dc"4229checksum = "a5884790f1ce3553ad55fec37b5aaac5882e0e845a2612df744d6c85c9bf046c"
3502dependencies = [4230dependencies = [
3503 "cfg-if",4231 "cfg-if 0.1.10",
3504 "universal-hash",4232 "universal-hash",
3505]4233]
35064234
3507[[package]]4235[[package]]
3508name = "ppv-lite86"4236name = "ppv-lite86"
3509version = "0.2.8"4237version = "0.2.9"
3510source = "registry+https://github.com/rust-lang/crates.io-index"4238source = "registry+https://github.com/rust-lang/crates.io-index"
3511checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea"4239checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20"
35124240
3513[[package]]4241[[package]]
3514name = "primitive-types"4242name = "primitive-types"
3518dependencies = [4246dependencies = [
3519 "fixed-hash",4247 "fixed-hash",
3520 "impl-codec",4248 "impl-codec",
3521 "impl-serde 0.3.1",4249 "impl-serde",
3522 "uint",4250 "uint",
3523]4251]
35244252
35334261
3534[[package]]4262[[package]]
3535name = "proc-macro-error"4263name = "proc-macro-error"
3536version = "1.0.3"4264version = "1.0.4"
3537source = "registry+https://github.com/rust-lang/crates.io-index"4265source = "registry+https://github.com/rust-lang/crates.io-index"
3538checksum = "fc175e9777c3116627248584e8f8b3e2987405cabe1c0adf7d1dd28f09dc7880"4266checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
3539dependencies = [4267dependencies = [
3540 "proc-macro-error-attr",4268 "proc-macro-error-attr",
3541 "proc-macro2",4269 "proc-macro2",
3542 "quote 1.0.7",4270 "quote",
3543 "syn 1.0.34",4271 "syn",
3544 "version_check",4272 "version_check",
3545]4273]
35464274
3547[[package]]4275[[package]]
3548name = "proc-macro-error-attr"4276name = "proc-macro-error-attr"
3549version = "1.0.3"4277version = "1.0.4"
3550source = "registry+https://github.com/rust-lang/crates.io-index"4278source = "registry+https://github.com/rust-lang/crates.io-index"
3551checksum = "3cc9795ca17eb581285ec44936da7fc2335a3f34f2ddd13118b6f4d515435c50"4279checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
3552dependencies = [4280dependencies = [
3553 "proc-macro2",4281 "proc-macro2",
3554 "quote 1.0.7",4282 "quote",
3555 "syn 1.0.34",
3556 "syn-mid",
3557 "version_check",4283 "version_check",
3558]4284]
35594285
3560[[package]]4286[[package]]
3561name = "proc-macro-hack"4287name = "proc-macro-hack"
3562version = "0.5.16"4288version = "0.5.18"
3563source = "registry+https://github.com/rust-lang/crates.io-index"4289source = "registry+https://github.com/rust-lang/crates.io-index"
3564checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4"4290checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598"
35654291
3566[[package]]4292[[package]]
3567name = "proc-macro-nested"4293name = "proc-macro-nested"
35714297
3572[[package]]4298[[package]]
3573name = "proc-macro2"4299name = "proc-macro2"
3574version = "1.0.19"4300version = "1.0.24"
3575source = "registry+https://github.com/rust-lang/crates.io-index"4301source = "registry+https://github.com/rust-lang/crates.io-index"
3576checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12"4302checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
3577dependencies = [4303dependencies = [
3578 "unicode-xid 0.2.1",4304 "unicode-xid",
3579]4305]
3580
3581[[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]
35954306
3596[[package]]4307[[package]]
3597name = "prometheus"4308name = "prometheus"
3598version = "0.8.0"4309version = "0.10.0"
3599source = "registry+https://github.com/rust-lang/crates.io-index"4310source = "registry+https://github.com/rust-lang/crates.io-index"
3600checksum = "b0575e258dab62268e7236d7307caa38848acbda7ec7ab87bd9093791e999d20"4311checksum = "30d70cf4412832bcac9cffe27906f4a66e450d323525e977168c70d1b36120ae"
3601dependencies = [4312dependencies = [
3602 "cfg-if",4313 "cfg-if 0.1.10",
3603 "fnv",4314 "fnv",
3604 "lazy_static",4315 "lazy_static",
3605 "protobuf",4316 "parking_lot 0.11.0",
3606 "spin",4317 "regex",
3607 "thiserror",4318 "thiserror",
3608]4319]
36094320
3644 "anyhow",4355 "anyhow",
3645 "itertools 0.8.2",4356 "itertools 0.8.2",
3646 "proc-macro2",4357 "proc-macro2",
3647 "quote 1.0.7",4358 "quote",
3648 "syn 1.0.34",4359 "syn",
3649]4360]
36504361
3651[[package]]4362[[package]]
3658 "prost",4369 "prost",
3659]4370]
3660
3661[[package]]
3662name = "protobuf"
3663version = "2.16.2"
3664source = "registry+https://github.com/rust-lang/crates.io-index"
3665checksum = "d883f78645c21b7281d21305181aa1f4dd9e9363e7cf2566c93121552cff003e"
36664371
3667[[package]]4372[[package]]
3668name = "pwasm-utils"4373name = "pwasm-utils"
3669version = "0.12.0"4374version = "0.14.0"
3670source = "registry+https://github.com/rust-lang/crates.io-index"4375source = "registry+https://github.com/rust-lang/crates.io-index"
3671checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192"4376checksum = "0f53bc2558e8376358ebdc28301546471d67336584f6438ed4b7c7457a055fd7"
3672dependencies = [4377dependencies = [
3673 "byteorder",4378 "byteorder 1.3.4",
3674 "log",4379 "log",
3675 "parity-wasm",4380 "parity-wasm",
3676]4381]
3692 "pin-project-lite",4397 "pin-project-lite",
3693]4398]
3694
3695[[package]]
3696name = "quote"
3697version = "0.3.15"
3698source = "registry+https://github.com/rust-lang/crates.io-index"
3699checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
37004399
3701[[package]]4400[[package]]
3702name = "quote"4401name = "quote"
3742source = "registry+https://github.com/rust-lang/crates.io-index"4441source = "registry+https://github.com/rust-lang/crates.io-index"
3743checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"4442checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9"
3744dependencies = [4443dependencies = [
3745 "cloudabi",4444 "cloudabi 0.0.3",
3746 "fuchsia-cprng",4445 "fuchsia-cprng",
3747 "libc",4446 "libc",
3748 "rand_core 0.3.1",4447 "rand_core 0.3.1",
3774source = "registry+https://github.com/rust-lang/crates.io-index"4473source = "registry+https://github.com/rust-lang/crates.io-index"
3775checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"4474checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
3776dependencies = [4475dependencies = [
3777 "getrandom",4476 "getrandom 0.1.15",
3778 "libc",4477 "libc",
3779 "rand_chacha 0.2.2",4478 "rand_chacha 0.2.2",
3780 "rand_core 0.5.1",4479 "rand_core 0.5.1",
3823source = "registry+https://github.com/rust-lang/crates.io-index"4522source = "registry+https://github.com/rust-lang/crates.io-index"
3824checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"4523checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
3825dependencies = [4524dependencies = [
3826 "getrandom",4525 "getrandom 0.1.15",
3827]4526]
38284527
3829[[package]]4528[[package]]
3870source = "registry+https://github.com/rust-lang/crates.io-index"4569source = "registry+https://github.com/rust-lang/crates.io-index"
3871checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"4570checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
3872dependencies = [4571dependencies = [
3873 "cloudabi",4572 "cloudabi 0.0.3",
3874 "fuchsia-cprng",4573 "fuchsia-cprng",
3875 "libc",4574 "libc",
3876 "rand_core 0.4.2",4575 "rand_core 0.4.2",
3906 "rand_core 0.3.1",4605 "rand_core 0.3.1",
3907]4606]
4607
4608[[package]]
4609name = "raw-cpuid"
4610version = "7.0.3"
4611source = "registry+https://github.com/rust-lang/crates.io-index"
4612checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf"
4613dependencies = [
4614 "bitflags",
4615 "cc",
4616 "rustc_version",
4617]
39084618
3909[[package]]4619[[package]]
3910name = "rawpointer"4620name = "rawpointer"
39144624
3915[[package]]4625[[package]]
3916name = "rayon"4626name = "rayon"
3917version = "1.3.1"4627version = "1.4.1"
3918source = "registry+https://github.com/rust-lang/crates.io-index"4628source = "registry+https://github.com/rust-lang/crates.io-index"
3919checksum = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080"4629checksum = "dcf6960dc9a5b4ee8d3e4c5787b4a112a8818e0290a42ff664ad60692fdf2032"
3920dependencies = [4630dependencies = [
3921 "autocfg 1.0.0",4631 "autocfg 1.0.1",
3922 "crossbeam-deque",4632 "crossbeam-deque",
3923 "either",4633 "either",
3924 "rayon-core",4634 "rayon-core",
3925]4635]
39264636
3927[[package]]4637[[package]]
3928name = "rayon-core"4638name = "rayon-core"
3929version = "1.7.1"4639version = "1.8.1"
3930source = "registry+https://github.com/rust-lang/crates.io-index"4640source = "registry+https://github.com/rust-lang/crates.io-index"
3931checksum = "e92e15d89083484e11353891f1af602cc661426deb9564c298b270c726973280"4641checksum = "e8c4fec834fb6e6d2dd5eece3c7b432a52f0ba887cf40e595190c4107edc08bf"
3932dependencies = [4642dependencies = [
4643 "crossbeam-channel",
3933 "crossbeam-deque",4644 "crossbeam-deque",
3934 "crossbeam-queue",
3935 "crossbeam-utils",4645 "crossbeam-utils",
3936 "lazy_static",4646 "lazy_static",
3937 "num_cpus",4647 "num_cpus",
39544664
3955[[package]]4665[[package]]
3956name = "redox_users"4666name = "redox_users"
3957version = "0.3.4"4667version = "0.3.5"
3958source = "registry+https://github.com/rust-lang/crates.io-index"4668source = "registry+https://github.com/rust-lang/crates.io-index"
3959checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431"4669checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
3960dependencies = [4670dependencies = [
3961 "getrandom",4671 "getrandom 0.1.15",
3962 "redox_syscall",4672 "redox_syscall",
3963 "rust-argon2",4673 "rust-argon2",
3964]4674]
3979checksum = "7d21b475ab879ef0e315ad99067fa25778c3b0377f57f1b00207448dac1a3144"4689checksum = "7d21b475ab879ef0e315ad99067fa25778c3b0377f57f1b00207448dac1a3144"
3980dependencies = [4690dependencies = [
3981 "proc-macro2",4691 "proc-macro2",
3982 "quote 1.0.7",4692 "quote",
3983 "syn 1.0.34",4693 "syn",
3984]4694]
4695
4696[[package]]
4697name = "regalloc"
4698version = "0.0.27"
4699source = "registry+https://github.com/rust-lang/crates.io-index"
4700checksum = "b9ba8aaf5fe7cf307c6dbdaeed85478961d29e25e3bee5169e11b92fa9f027a8"
4701dependencies = [
4702 "log",
4703 "rustc-hash",
4704 "smallvec 1.4.2",
4705]
39854706
3986[[package]]4707[[package]]
3987name = "regex"4708name = "regex"
3988version = "1.3.9"4709version = "1.4.1"
3989source = "registry+https://github.com/rust-lang/crates.io-index"4710source = "registry+https://github.com/rust-lang/crates.io-index"
3990checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"4711checksum = "8963b85b8ce3074fecffde43b4b0dded83ce2f367dc8d363afc56679f3ee820b"
3991dependencies = [4712dependencies = [
3992 "aho-corasick",4713 "aho-corasick",
3993 "memchr",4714 "memchr",
3994 "regex-syntax",4715 "regex-syntax",
3995 "thread_local",4716 "thread_local",
3996]4717]
4718
4719[[package]]
4720name = "regex-automata"
4721version = "0.1.9"
4722source = "registry+https://github.com/rust-lang/crates.io-index"
4723checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4"
4724dependencies = [
4725 "byteorder 1.3.4",
4726 "regex-syntax",
4727]
39974728
3998[[package]]4729[[package]]
3999name = "regex-syntax"4730name = "regex-syntax"
4000version = "0.6.18"4731version = "0.6.20"
4001source = "registry+https://github.com/rust-lang/crates.io-index"4732source = "registry+https://github.com/rust-lang/crates.io-index"
4002checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"4733checksum = "8cab7a364d15cde1e505267766a2d3c4e22a843e1a601f0fa7564c0f82ced11c"
4734
4735[[package]]
4736name = "region"
4737version = "2.2.0"
4738source = "registry+https://github.com/rust-lang/crates.io-index"
4739checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0"
4740dependencies = [
4741 "bitflags",
4742 "libc",
4743 "mach",
4744 "winapi 0.3.9",
4745]
40034746
4004[[package]]4747[[package]]
4005name = "remove_dir_all"4748name = "remove_dir_all"
4010 "winapi 0.3.9",4753 "winapi 0.3.9",
4011]4754]
4012
4013[[package]]
4014name = "rental"
4015version = "0.5.5"
4016source = "registry+https://github.com/rust-lang/crates.io-index"
4017checksum = "8545debe98b2b139fb04cad8618b530e9b07c152d99a5de83c860b877d67847f"
4018dependencies = [
4019 "rental-impl",
4020 "stable_deref_trait",
4021]
40224755
4023[[package]]4756[[package]]
4024name = "rental-impl"4757name = "retain_mut"
4025version = "0.5.5"4758version = "0.1.1"
4026source = "registry+https://github.com/rust-lang/crates.io-index"4759source = "registry+https://github.com/rust-lang/crates.io-index"
4027checksum = "475e68978dc5b743f2f40d8e0a8fdc83f1c5e78cbf4b8fa5e74e73beebc340de"4760checksum = "e005d658ad26eacc2b6c506dfde519f4e277e328d0eb3379ca61647d70a8f531"
4028dependencies = [
4029 "proc-macro2",
4030 "quote 1.0.7",
4031 "syn 1.0.34",
4032]
40334761
4034[[package]]4762[[package]]
4035name = "ring"4763name = "ring"
4039dependencies = [4767dependencies = [
4040 "cc",4768 "cc",
4041 "libc",4769 "libc",
4042 "once_cell",4770 "once_cell 1.4.1",
4043 "spin",4771 "spin",
4044 "untrusted",4772 "untrusted",
4045 "web-sys",4773 "web-sys",
4046 "winapi 0.3.9",4774 "winapi 0.3.9",
4047]4775]
4048
4049[[package]]
4050name = "rle-decode-fast"
4051version = "1.0.1"
4052source = "registry+https://github.com/rust-lang/crates.io-index"
4053checksum = "cabe4fa914dec5870285fa7f71f602645da47c486e68486d2b4ceb4a343e90ac"
40544776
4055[[package]]4777[[package]]
4056name = "rocksdb"4778name = "rocksdb"
4057version = "0.14.0"4779version = "0.15.0"
4058source = "registry+https://github.com/rust-lang/crates.io-index"4780source = "registry+https://github.com/rust-lang/crates.io-index"
4059checksum = "61aa17a99a2413cd71c1106691bf59dad7de0cd5099127f90e9d99c429c40d4a"4781checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6"
4060dependencies = [4782dependencies = [
4061 "libc",4783 "libc",
4062 "librocksdb-sys",4784 "librocksdb-sys",
40744796
4075[[package]]4797[[package]]
4076name = "rust-argon2"4798name = "rust-argon2"
4077version = "0.7.0"4799version = "0.8.2"
4078source = "registry+https://github.com/rust-lang/crates.io-index"4800source = "registry+https://github.com/rust-lang/crates.io-index"
4079checksum = "2bc8af4bda8e1ff4932523b94d3dd20ee30a87232323eda55903ffd71d2fb017"4801checksum = "9dab61250775933275e84053ac235621dfb739556d5c54a2f2e9313b7cf43a19"
4080dependencies = [4802dependencies = [
4081 "base64",4803 "base64 0.12.3",
4082 "blake2b_simd",4804 "blake2b_simd",
4083 "constant_time_eq",4805 "constant_time_eq",
4084 "crossbeam-utils",4806 "crossbeam-utils",
4085]4807]
40864808
4087[[package]]4809[[package]]
4088name = "rustc-demangle"4810name = "rustc-demangle"
4089version = "0.1.16"4811version = "0.1.17"
4090source = "registry+https://github.com/rust-lang/crates.io-index"4812source = "registry+https://github.com/rust-lang/crates.io-index"
4091checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"4813checksum = "b2610b7f643d18c87dff3b489950269617e6601a51f1f05aa5daefee36f64f0b"
40924814
4093[[package]]4815[[package]]
4094name = "rustc-hash"4816name = "rustc-hash"
41134835
4114[[package]]4836[[package]]
4115name = "rustls"4837name = "rustls"
4116version = "0.17.0"4838version = "0.18.1"
4117source = "registry+https://github.com/rust-lang/crates.io-index"4839source = "registry+https://github.com/rust-lang/crates.io-index"
4118checksum = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1"4840checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81"
4119dependencies = [4841dependencies = [
4120 "base64",4842 "base64 0.12.3",
4121 "log",4843 "log",
4122 "ring",4844 "ring",
4123 "sct",4845 "sct",
41264848
4127[[package]]4849[[package]]
4128name = "rustls-native-certs"4850name = "rustls-native-certs"
4129version = "0.3.0"4851version = "0.4.0"
4130source = "registry+https://github.com/rust-lang/crates.io-index"4852source = "registry+https://github.com/rust-lang/crates.io-index"
4131checksum = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5"4853checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8"
4132dependencies = [4854dependencies = [
4133 "openssl-probe",4855 "openssl-probe",
4134 "rustls",4856 "rustls",
4142source = "registry+https://github.com/rust-lang/crates.io-index"4864source = "registry+https://github.com/rust-lang/crates.io-index"
4143checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"4865checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"
4144dependencies = [4866dependencies = [
4145 "futures 0.3.5",4867 "futures 0.3.6",
4146 "pin-project",4868 "pin-project",
4147 "static_assertions",4869 "static_assertions",
4148]4870]
4162 "rustc_version",4884 "rustc_version",
4163]4885]
4886
4887[[package]]
4888name = "salsa20"
4889version = "0.3.0"
4890source = "registry+https://github.com/rust-lang/crates.io-index"
4891checksum = "2324b0e8c3bb9a586a571fdb3136f70e7e2c748de00a78043f86e0cff91f91fe"
4892dependencies = [
4893 "byteorder 1.3.4",
4894 "salsa20-core",
4895 "stream-cipher 0.3.2",
4896]
4897
4898[[package]]
4899name = "salsa20-core"
4900version = "0.2.3"
4901source = "registry+https://github.com/rust-lang/crates.io-index"
4902checksum = "2fe6cc1b9f5a5867853ade63099de70f042f7679e408d1ffe52821c9248e6e69"
4903dependencies = [
4904 "stream-cipher 0.3.2",
4905]
41644906
4165[[package]]4907[[package]]
4166name = "sc-basic-authorship"4908name = "sc-basic-authorship"
4167version = "0.8.0-rc4"4909version = "0.8.0"
4168source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"4910source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4169dependencies = [4911dependencies = [
4170 "futures 0.3.5",4912 "futures 0.3.6",
4171 "futures-timer 3.0.2",4913 "futures-timer 3.0.2",
4172 "log",4914 "log",
4173 "parity-scale-codec",4915 "parity-scale-codec",
41884930
4189[[package]]4931[[package]]
4190name = "sc-block-builder"4932name = "sc-block-builder"
4191version = "0.8.0-rc4"4933version = "0.8.0"
4192source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"4934source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4193dependencies = [4935dependencies = [
4194 "parity-scale-codec",4936 "parity-scale-codec",
4195 "sc-client-api",4937 "sc-client-api",
4198 "sp-blockchain",4940 "sp-blockchain",
4199 "sp-consensus",4941 "sp-consensus",
4200 "sp-core",4942 "sp-core",
4943 "sp-inherents",
4201 "sp-runtime",4944 "sp-runtime",
4202 "sp-state-machine",4945 "sp-state-machine",
4203]4946]
42044947
4205[[package]]4948[[package]]
4206name = "sc-chain-spec"4949name = "sc-chain-spec"
4207version = "2.0.0-rc4"4950version = "2.0.0"
4208source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"4951source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4209dependencies = [4952dependencies = [
4210 "impl-trait-for-tuples",4953 "impl-trait-for-tuples",
4954 "parity-scale-codec",
4211 "sc-chain-spec-derive",4955 "sc-chain-spec-derive",
4212 "sc-network",4956 "sc-network",
4213 "sc-telemetry",4957 "sc-telemetry",
42204964
4221[[package]]4965[[package]]
4222name = "sc-chain-spec-derive"4966name = "sc-chain-spec-derive"
4223version = "2.0.0-rc4"4967version = "2.0.0"
4224source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"4968source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4225dependencies = [4969dependencies = [
4226 "proc-macro-crate",4970 "proc-macro-crate",
4227 "proc-macro2",4971 "proc-macro2",
4228 "quote 1.0.7",4972 "quote",
4229 "syn 1.0.34",4973 "syn",
4230]4974]
42314975
4232[[package]]4976[[package]]
4233name = "sc-cli"4977name = "sc-cli"
4234version = "0.8.0-rc4"4978version = "0.8.0"
4235source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"4979source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4236dependencies = [4980dependencies = [
4237 "ansi_term 0.12.1",4981 "ansi_term 0.12.1",
4238 "atty",4982 "atty",
4983 "bip39",
4239 "chrono",4984 "chrono",
4240 "derive_more",4985 "derive_more",
4241 "env_logger",
4242 "fdlimit",4986 "fdlimit",
4243 "futures 0.3.5",4987 "futures 0.3.6",
4988 "hex",
4244 "lazy_static",4989 "lazy_static",
4990 "libp2p",
4245 "log",4991 "log",
4246 "names",4992 "names",
4247 "nix",4993 "nix",
4994 "parity-scale-codec",
4248 "parity-util-mem",4995 "parity-util-mem",
4996 "rand 0.7.3",
4249 "regex",4997 "regex",
4250 "rpassword",4998 "rpassword",
4251 "sc-client-api",4999 "sc-client-api",
4252 "sc-informant",5000 "sc-informant",
5001 "sc-keystore",
4253 "sc-network",5002 "sc-network",
4254 "sc-service",5003 "sc-service",
4255 "sc-telemetry",5004 "sc-telemetry",
4256 "sc-tracing",5005 "sc-tracing",
5006 "serde",
4257 "serde_json",5007 "serde_json",
4258 "sp-blockchain",5008 "sp-blockchain",
4259 "sp-core",5009 "sp-core",
4266 "structopt",5016 "structopt",
4267 "substrate-prometheus-endpoint",5017 "substrate-prometheus-endpoint",
4268 "time",5018 "time",
4269 "tokio 0.2.21",5019 "tokio 0.2.22",
5020 "tracing",
5021 "tracing-log",
5022 "tracing-subscriber",
4270]5023]
42715024
4272[[package]]5025[[package]]
4273name = "sc-client-api"5026name = "sc-client-api"
4274version = "2.0.0-rc4"5027version = "2.0.0"
4275source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5028source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4276dependencies = [5029dependencies = [
4277 "derive_more",5030 "derive_more",
4278 "fnv",5031 "fnv",
4279 "futures 0.3.5",5032 "futures 0.3.6",
4280 "hash-db",5033 "hash-db",
4281 "hex-literal",5034 "hex-literal",
4282 "kvdb",5035 "kvdb",
43075060
4308[[package]]5061[[package]]
4309name = "sc-client-db"5062name = "sc-client-db"
4310version = "0.8.0-rc4"5063version = "0.8.0"
4311source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5064source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4312dependencies = [5065dependencies = [
4313 "blake2-rfc",5066 "blake2-rfc",
4314 "hash-db",5067 "hash-db",
4324 "sc-client-api",5077 "sc-client-api",
4325 "sc-executor",5078 "sc-executor",
4326 "sc-state-db",5079 "sc-state-db",
5080 "sp-arithmetic",
4327 "sp-blockchain",5081 "sp-blockchain",
4328 "sp-consensus",5082 "sp-consensus",
4329 "sp-core",5083 "sp-core",
43365090
4337[[package]]5091[[package]]
4338name = "sc-consensus"5092name = "sc-consensus"
4339version = "0.8.0-rc4"5093version = "0.8.0"
4340source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5094source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4341dependencies = [5095dependencies = [
4342 "sc-client-api",5096 "sc-client-api",
4343 "sp-blockchain",5097 "sp-blockchain",
43475101
4348[[package]]5102[[package]]
4349name = "sc-consensus-aura"5103name = "sc-consensus-aura"
4350version = "0.8.0-rc4"5104version = "0.8.0"
4351source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5105source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4352dependencies = [5106dependencies = [
4353 "derive_more",5107 "derive_more",
4354 "futures 0.3.5",5108 "futures 0.3.6",
4355 "futures-timer 3.0.2",5109 "futures-timer 3.0.2",
4356 "log",5110 "log",
4357 "parity-scale-codec",5111 "parity-scale-codec",
43785132
4379[[package]]5133[[package]]
4380name = "sc-consensus-slots"5134name = "sc-consensus-slots"
4381version = "0.8.0-rc4"5135version = "0.8.0"
4382source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5136source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4383dependencies = [5137dependencies = [
4384 "futures 0.3.5",5138 "futures 0.3.6",
4385 "futures-timer 3.0.2",5139 "futures-timer 3.0.2",
4386 "log",5140 "log",
4387 "parity-scale-codec",5141 "parity-scale-codec",
4392 "sp-application-crypto",5146 "sp-application-crypto",
4393 "sp-blockchain",5147 "sp-blockchain",
4394 "sp-consensus",5148 "sp-consensus",
5149 "sp-consensus-slots",
4395 "sp-core",5150 "sp-core",
4396 "sp-inherents",5151 "sp-inherents",
4397 "sp-runtime",5152 "sp-runtime",
44005155
4401[[package]]5156[[package]]
4402name = "sc-executor"5157name = "sc-executor"
4403version = "0.8.0-rc4"5158version = "0.8.0"
4404source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5159source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4405dependencies = [5160dependencies = [
4406 "derive_more",5161 "derive_more",
4407 "lazy_static",5162 "lazy_static",
4412 "parking_lot 0.10.2",5167 "parking_lot 0.10.2",
4413 "sc-executor-common",5168 "sc-executor-common",
4414 "sc-executor-wasmi",5169 "sc-executor-wasmi",
5170 "sc-executor-wasmtime",
4415 "sp-api",5171 "sp-api",
4416 "sp-core",5172 "sp-core",
4417 "sp-externalities",5173 "sp-externalities",
44275183
4428[[package]]5184[[package]]
4429name = "sc-executor-common"5185name = "sc-executor-common"
4430version = "0.8.0-rc4"5186version = "0.8.0"
4431source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5187source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4432dependencies = [5188dependencies = [
4433 "derive_more",5189 "derive_more",
4434 "log",5190 "log",
44445200
4445[[package]]5201[[package]]
4446name = "sc-executor-wasmi"5202name = "sc-executor-wasmi"
4447version = "0.8.0-rc4"5203version = "0.8.0"
4448source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5204source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4449dependencies = [5205dependencies = [
4450 "log",5206 "log",
4451 "parity-scale-codec",5207 "parity-scale-codec",
4457 "wasmi",5213 "wasmi",
4458]5214]
5215
5216[[package]]
5217name = "sc-executor-wasmtime"
5218version = "0.8.0"
5219source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5220dependencies = [
5221 "log",
5222 "parity-scale-codec",
5223 "parity-wasm",
5224 "pwasm-utils",
5225 "sc-executor-common",
5226 "scoped-tls",
5227 "sp-allocator",
5228 "sp-core",
5229 "sp-runtime-interface",
5230 "sp-wasm-interface",
5231 "wasmtime",
5232]
44595233
4460[[package]]5234[[package]]
4461name = "sc-finality-grandpa"5235name = "sc-finality-grandpa"
4462version = "0.8.0-rc4"5236version = "0.8.0"
4463source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5237source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4464dependencies = [5238dependencies = [
4465 "assert_matches",
4466 "derive_more",5239 "derive_more",
4467 "finality-grandpa",5240 "finality-grandpa",
4468 "fork-tree",5241 "fork-tree",
4469 "futures 0.3.5",5242 "futures 0.3.6",
4470 "futures-timer 3.0.2",5243 "futures-timer 3.0.2",
4471 "log",5244 "log",
4472 "parity-scale-codec",5245 "parity-scale-codec",
44975270
4498[[package]]5271[[package]]
4499name = "sc-informant"5272name = "sc-informant"
4500version = "0.8.0-rc4"5273version = "0.8.0"
4501source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5274source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4502dependencies = [5275dependencies = [
4503 "ansi_term 0.12.1",5276 "ansi_term 0.12.1",
4504 "futures 0.3.5",5277 "futures 0.3.6",
4505 "log",5278 "log",
4506 "parity-util-mem",5279 "parity-util-mem",
4507 "parking_lot 0.10.2",
4508 "sc-client-api",5280 "sc-client-api",
4509 "sc-network",5281 "sc-network",
4510 "sp-blockchain",5282 "sp-blockchain",
45165288
4517[[package]]5289[[package]]
4518name = "sc-keystore"5290name = "sc-keystore"
4519version = "2.0.0-rc4"5291version = "2.0.0"
4520source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5292source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4521dependencies = [5293dependencies = [
4522 "derive_more",5294 "derive_more",
4523 "hex",5295 "hex",
4527 "serde_json",5299 "serde_json",
4528 "sp-application-crypto",5300 "sp-application-crypto",
4529 "sp-core",5301 "sp-core",
4530 "subtle 2.2.3",5302 "subtle 2.3.0",
4531]5303]
45325304
4533[[package]]5305[[package]]
4534name = "sc-light"5306name = "sc-light"
4535version = "2.0.0-rc4"5307version = "2.0.0"
4536source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5308source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4537dependencies = [5309dependencies = [
4538 "hash-db",5310 "hash-db",
4539 "lazy_static",5311 "lazy_static",
45515323
4552[[package]]5324[[package]]
4553name = "sc-network"5325name = "sc-network"
4554version = "0.8.0-rc4"5326version = "0.8.0"
4555source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5327source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4556dependencies = [5328dependencies = [
5329 "async-std",
5330 "async-trait",
4557 "bitflags",5331 "bitflags",
4558 "bs58",5332 "bs58",
4559 "bytes 0.5.6",5333 "bytes 0.5.6",
4562 "erased-serde",5336 "erased-serde",
4563 "fnv",5337 "fnv",
4564 "fork-tree",5338 "fork-tree",
4565 "futures 0.3.5",5339 "futures 0.3.6",
4566 "futures-timer 3.0.2",5340 "futures-timer 3.0.2",
4567 "futures_codec 0.3.4",5341 "futures_codec",
4568 "hex",5342 "hex",
4569 "ip_network",5343 "ip_network",
4570 "libp2p",5344 "libp2p",
4571 "linked-hash-map",5345 "linked-hash-map",
4572 "linked_hash_set",5346 "linked_hash_set",
4573 "log",5347 "log",
4574 "lru",5348 "lru 0.4.3",
4575 "nohash-hasher",5349 "nohash-hasher",
4576 "parity-scale-codec",5350 "parity-scale-codec",
4577 "parking_lot 0.10.2",5351 "parking_lot 0.10.2",
4595 "sp-utils",5369 "sp-utils",
4596 "substrate-prometheus-endpoint",5370 "substrate-prometheus-endpoint",
4597 "thiserror",5371 "thiserror",
4598 "unsigned-varint 0.3.3",5372 "unsigned-varint 0.4.0",
4599 "void",5373 "void",
4600 "wasm-timer",5374 "wasm-timer",
4601 "zeroize",5375 "zeroize",
4602]5376]
46035377
4604[[package]]5378[[package]]
4605name = "sc-network-gossip"5379name = "sc-network-gossip"
4606version = "0.8.0-rc4"5380version = "0.8.0"
4607source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5381source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4608dependencies = [5382dependencies = [
4609 "futures 0.3.5",5383 "futures 0.3.6",
4610 "futures-timer 3.0.2",5384 "futures-timer 3.0.2",
4611 "libp2p",5385 "libp2p",
4612 "log",5386 "log",
4613 "lru",5387 "lru 0.4.3",
4614 "sc-network",5388 "sc-network",
4615 "sp-runtime",5389 "sp-runtime",
4616 "wasm-timer",5390 "wasm-timer",
4617]5391]
46185392
4619[[package]]5393[[package]]
4620name = "sc-offchain"5394name = "sc-offchain"
4621version = "2.0.0-rc4"5395version = "2.0.0"
4622source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5396source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4623dependencies = [5397dependencies = [
4624 "bytes 0.5.6",5398 "bytes 0.5.6",
4625 "fnv",5399 "fnv",
4626 "futures 0.3.5",5400 "futures 0.3.6",
4627 "futures-timer 3.0.2",5401 "futures-timer 3.0.2",
4628 "hyper 0.13.7",5402 "hyper 0.13.8",
4629 "hyper-rustls",5403 "hyper-rustls",
4630 "log",5404 "log",
4631 "num_cpus",5405 "num_cpus",
46455419
4646[[package]]5420[[package]]
4647name = "sc-peerset"5421name = "sc-peerset"
4648version = "2.0.0-rc4"5422version = "2.0.0"
4649source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5423source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4650dependencies = [5424dependencies = [
4651 "futures 0.3.5",5425 "futures 0.3.6",
4652 "libp2p",5426 "libp2p",
4653 "log",5427 "log",
4654 "serde_json",5428 "serde_json",
46585432
4659[[package]]5433[[package]]
4660name = "sc-proposer-metrics"5434name = "sc-proposer-metrics"
4661version = "0.8.0-rc4"5435version = "0.8.0"
4662source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5436source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4663dependencies = [5437dependencies = [
4664 "log",5438 "log",
4665 "substrate-prometheus-endpoint",5439 "substrate-prometheus-endpoint",
4666]5440]
46675441
4668[[package]]5442[[package]]
4669name = "sc-rpc"5443name = "sc-rpc"
4670version = "2.0.0-rc4"5444version = "2.0.0"
4671source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5445source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4672dependencies = [5446dependencies = [
4673 "futures 0.3.5",5447 "futures 0.3.6",
4674 "hash-db",5448 "hash-db",
4675 "jsonrpc-core",5449 "jsonrpc-core",
4676 "jsonrpc-pubsub",5450 "jsonrpc-pubsub",
46995473
4700[[package]]5474[[package]]
4701name = "sc-rpc-api"5475name = "sc-rpc-api"
4702version = "0.8.0-rc4"5476version = "0.8.0"
4703source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5477source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4704dependencies = [5478dependencies = [
4705 "derive_more",5479 "derive_more",
4706 "futures 0.3.5",5480 "futures 0.3.6",
4707 "jsonrpc-core",5481 "jsonrpc-core",
4708 "jsonrpc-core-client",5482 "jsonrpc-core-client",
4709 "jsonrpc-derive",5483 "jsonrpc-derive",
47235497
4724[[package]]5498[[package]]
4725name = "sc-rpc-server"5499name = "sc-rpc-server"
4726version = "2.0.0-rc4"5500version = "2.0.0"
4727source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5501source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4728dependencies = [5502dependencies = [
5503 "futures 0.1.30",
4729 "jsonrpc-core",5504 "jsonrpc-core",
4730 "jsonrpc-http-server",5505 "jsonrpc-http-server",
4731 "jsonrpc-ipc-server",5506 "jsonrpc-ipc-server",
4735 "serde",5510 "serde",
4736 "serde_json",5511 "serde_json",
4737 "sp-runtime",5512 "sp-runtime",
5513 "substrate-prometheus-endpoint",
4738]5514]
47395515
4740[[package]]5516[[package]]
4741name = "sc-service"5517name = "sc-service"
4742version = "0.8.0-rc4"5518version = "0.8.0"
4743source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5519source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4744dependencies = [5520dependencies = [
4745 "derive_more",5521 "derive_more",
4746 "directories",5522 "directories",
4747 "exit-future",5523 "exit-future",
4748 "futures 0.1.29",5524 "futures 0.1.30",
4749 "futures 0.3.5",5525 "futures 0.3.6",
4750 "futures-timer 3.0.2",5526 "futures-timer 3.0.2",
4751 "hash-db",5527 "hash-db",
5528 "jsonrpc-core",
4752 "jsonrpc-pubsub",5529 "jsonrpc-pubsub",
4753 "lazy_static",5530 "lazy_static",
4754 "log",5531 "log",
4755 "netstat2",
4756 "parity-multiaddr 0.7.3",
4757 "parity-scale-codec",5532 "parity-scale-codec",
4758 "parity-util-mem",5533 "parity-util-mem",
4759 "parking_lot 0.10.2",5534 "parking_lot 0.10.2",
4760 "pin-project",5535 "pin-project",
4761 "procfs",
4762 "rand 0.7.3",5536 "rand 0.7.3",
4763 "sc-block-builder",5537 "sc-block-builder",
4764 "sc-chain-spec",5538 "sc-chain-spec",
4785 "sp-consensus",5559 "sp-consensus",
4786 "sp-core",5560 "sp-core",
4787 "sp-externalities",5561 "sp-externalities",
5562 "sp-inherents",
4788 "sp-io",5563 "sp-io",
4789 "sp-runtime",5564 "sp-runtime",
4790 "sp-session",5565 "sp-session",
4791 "sp-state-machine",5566 "sp-state-machine",
5567 "sp-tracing",
4792 "sp-transaction-pool",5568 "sp-transaction-pool",
4793 "sp-trie",5569 "sp-trie",
4794 "sp-utils",5570 "sp-utils",
4795 "sp-version",5571 "sp-version",
4796 "substrate-prometheus-endpoint",5572 "substrate-prometheus-endpoint",
4797 "sysinfo",
4798 "tempfile",5573 "tempfile",
4799 "tracing",5574 "tracing",
4800 "wasm-timer",5575 "wasm-timer",
4801]5576]
48025577
4803[[package]]5578[[package]]
4804name = "sc-state-db"5579name = "sc-state-db"
4805version = "0.8.0-rc4"5580version = "0.8.0"
4806source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5581source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4807dependencies = [5582dependencies = [
4808 "log",5583 "log",
4809 "parity-scale-codec",5584 "parity-scale-codec",
48165591
4817[[package]]5592[[package]]
4818name = "sc-telemetry"5593name = "sc-telemetry"
4819version = "2.0.0-rc4"5594version = "2.0.0"
4820source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5595source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4821dependencies = [5596dependencies = [
4822 "bytes 0.5.6",
4823 "futures 0.3.5",5597 "futures 0.3.6",
4824 "futures-timer 3.0.2",5598 "futures-timer 3.0.2",
4825 "libp2p",5599 "libp2p",
4826 "log",5600 "log",
48385612
4839[[package]]5613[[package]]
4840name = "sc-tracing"5614name = "sc-tracing"
4841version = "2.0.0-rc4"5615version = "2.0.0"
4842source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5616source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4843dependencies = [5617dependencies = [
4844 "erased-serde",5618 "erased-serde",
4845 "log",5619 "log",
4850 "serde_json",5624 "serde_json",
4851 "slog",5625 "slog",
4852 "sp-tracing",5626 "sp-tracing",
5627 "tracing",
4853 "tracing-core",5628 "tracing-core",
5629 "tracing-subscriber",
4854]5630]
48555631
4856[[package]]5632[[package]]
4857name = "sc-transaction-graph"5633name = "sc-transaction-graph"
4858version = "2.0.0-rc4"5634version = "2.0.0"
4859source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5635source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4860dependencies = [5636dependencies = [
4861 "derive_more",5637 "derive_more",
4862 "futures 0.3.5",5638 "futures 0.3.6",
4863 "linked-hash-map",5639 "linked-hash-map",
4864 "log",5640 "log",
4865 "parity-util-mem",5641 "parity-util-mem",
4866 "parking_lot 0.10.2",5642 "parking_lot 0.10.2",
5643 "retain_mut",
4867 "serde",5644 "serde",
4868 "sp-blockchain",5645 "sp-blockchain",
4869 "sp-core",5646 "sp-core",
48755652
4876[[package]]5653[[package]]
4877name = "sc-transaction-pool"5654name = "sc-transaction-pool"
4878version = "2.0.0-rc4"5655version = "2.0.0"
4879source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"5656source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
4880dependencies = [5657dependencies = [
4881 "derive_more",5658 "derive_more",
4882 "futures 0.3.5",5659 "futures 0.3.6",
4883 "futures-diagnose",5660 "futures-diagnose",
4884 "intervalier",5661 "intervalier",
4885 "log",5662 "log",
4917dependencies = [5694dependencies = [
4918 "arrayref",5695 "arrayref",
4919 "arrayvec 0.5.1",5696 "arrayvec 0.5.1",
4920 "curve25519-dalek",5697 "curve25519-dalek 2.1.0",
4921 "getrandom",5698 "getrandom 0.1.15",
4922 "merlin",5699 "merlin",
4923 "rand 0.7.3",5700 "rand 0.7.3",
4924 "rand_core 0.5.1",5701 "rand_core 0.5.1",
4925 "sha2 0.8.2",5702 "sha2 0.8.2",
4926 "subtle 2.2.3",5703 "subtle 2.3.0",
4927 "zeroize",5704 "zeroize",
4928]5705]
5706
5707[[package]]
5708name = "scoped-tls"
5709version = "1.0.0"
5710source = "registry+https://github.com/rust-lang/crates.io-index"
5711checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
5712
5713[[package]]
5714name = "scopeguard"
5715version = "0.3.3"
5716source = "registry+https://github.com/rust-lang/crates.io-index"
5717checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
49295718
4930[[package]]5719[[package]]
4931name = "scopeguard"5720name = "scopeguard"
4932version = "1.1.0"5721version = "1.1.0"
4933source = "registry+https://github.com/rust-lang/crates.io-index"5722source = "registry+https://github.com/rust-lang/crates.io-index"
4934checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"5723checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
5724
5725[[package]]
5726name = "scroll"
5727version = "0.10.2"
5728source = "registry+https://github.com/rust-lang/crates.io-index"
5729checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec"
5730dependencies = [
5731 "scroll_derive",
5732]
5733
5734[[package]]
5735name = "scroll_derive"
5736version = "0.10.3"
5737source = "registry+https://github.com/rust-lang/crates.io-index"
5738checksum = "6dfde5d1531034db129e95c76ac857e2baecea3443579d493d02224950b0fb6d"
5739dependencies = [
5740 "proc-macro2",
5741 "quote",
5742 "syn",
5743]
49355744
4936[[package]]5745[[package]]
4937name = "sct"5746name = "sct"
4943 "untrusted",5752 "untrusted",
4944]5753]
5754
5755[[package]]
5756name = "secrecy"
5757version = "0.6.0"
5758source = "registry+https://github.com/rust-lang/crates.io-index"
5759checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f"
5760dependencies = [
5761 "zeroize",
5762]
49455763
4946[[package]]5764[[package]]
4947name = "security-framework"5765name = "security-framework"
4948version = "0.4.4"5766version = "1.0.0"
4949source = "registry+https://github.com/rust-lang/crates.io-index"5767source = "registry+https://github.com/rust-lang/crates.io-index"
4950checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535"5768checksum = "ad502866817f0575705bd7be36e2b2535cc33262d493aa733a2ec862baa2bc2b"
4951dependencies = [5769dependencies = [
4952 "bitflags",5770 "bitflags",
4953 "core-foundation",5771 "core-foundation",
49585776
4959[[package]]5777[[package]]
4960name = "security-framework-sys"5778name = "security-framework-sys"
4961version = "0.4.3"5779version = "1.0.0"
4962source = "registry+https://github.com/rust-lang/crates.io-index"5780source = "registry+https://github.com/rust-lang/crates.io-index"
4963checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405"5781checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7"
4964dependencies = [5782dependencies = [
4965 "core-foundation-sys",5783 "core-foundation-sys",
4966 "libc",5784 "libc",
4981source = "registry+https://github.com/rust-lang/crates.io-index"5799source = "registry+https://github.com/rust-lang/crates.io-index"
4982checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"5800checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
4983
4984[[package]]
4985name = "send_wrapper"
4986version = "0.2.0"
4987source = "registry+https://github.com/rust-lang/crates.io-index"
4988checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4"
49895801
4990[[package]]5802[[package]]
4991name = "serde"5803name = "serde"
4992version = "1.0.114"5804version = "1.0.117"
4993source = "registry+https://github.com/rust-lang/crates.io-index"5805source = "registry+https://github.com/rust-lang/crates.io-index"
4994checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3"5806checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a"
4995dependencies = [5807dependencies = [
4996 "serde_derive",5808 "serde_derive",
4997]5809]
49985810
4999[[package]]5811[[package]]
5000name = "serde_derive"5812name = "serde_derive"
5001version = "1.0.114"5813version = "1.0.117"
5002source = "registry+https://github.com/rust-lang/crates.io-index"5814source = "registry+https://github.com/rust-lang/crates.io-index"
5003checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e"5815checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e"
5004dependencies = [5816dependencies = [
5005 "proc-macro2",5817 "proc-macro2",
5006 "quote 1.0.7",5818 "quote",
5007 "syn 1.0.34",5819 "syn",
5008]5820]
50095821
5010[[package]]5822[[package]]
5011name = "serde_json"5823name = "serde_json"
5012version = "1.0.56"5824version = "1.0.59"
5013source = "registry+https://github.com/rust-lang/crates.io-index"5825source = "registry+https://github.com/rust-lang/crates.io-index"
5014checksum = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3"5826checksum = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95"
5015dependencies = [5827dependencies = [
5016 "itoa",5828 "itoa",
5017 "ryu",5829 "ryu",
5031]5843]
50325844
5033[[package]]5845[[package]]
5034name = "sha1"5846name = "sha-1"
5035version = "0.6.0"5847version = "0.9.1"
5036source = "registry+https://github.com/rust-lang/crates.io-index"5848source = "registry+https://github.com/rust-lang/crates.io-index"
5037checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"5849checksum = "170a36ea86c864a3f16dd2687712dd6646f7019f301e57537c7f4dc9f5916770"
5850dependencies = [
5851 "block-buffer 0.9.0",
5852 "cfg-if 0.1.10",
5853 "cpuid-bool",
5854 "digest 0.9.0",
5855 "opaque-debug 0.3.0",
5856]
50385857
5039[[package]]5858[[package]]
5040name = "sha2"5859name = "sha2"
5055checksum = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1"5874checksum = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1"
5056dependencies = [5875dependencies = [
5057 "block-buffer 0.9.0",5876 "block-buffer 0.9.0",
5058 "cfg-if",5877 "cfg-if 0.1.10",
5059 "cpuid-bool",5878 "cpuid-bool",
5060 "digest 0.9.0",5879 "digest 0.9.0",
5061 "opaque-debug 0.3.0",5880 "opaque-debug 0.3.0",
5074 "opaque-debug 0.2.3",5893 "opaque-debug 0.2.3",
5075]5894]
5895
5896[[package]]
5897name = "sha3"
5898version = "0.9.1"
5899source = "registry+https://github.com/rust-lang/crates.io-index"
5900checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809"
5901dependencies = [
5902 "block-buffer 0.9.0",
5903 "digest 0.9.0",
5904 "keccak",
5905 "opaque-debug 0.3.0",
5906]
5907
5908[[package]]
5909name = "sharded-slab"
5910version = "0.0.9"
5911source = "registry+https://github.com/rust-lang/crates.io-index"
5912checksum = "06d5a3f5166fb5b42a5439f2eee8b9de149e235961e3eb21c5808fc3ea17ff3e"
5913dependencies = [
5914 "lazy_static",
5915]
50765916
5077[[package]]5917[[package]]
5078name = "shlex"5918name = "shlex"
50825922
5083[[package]]5923[[package]]
5084name = "signal-hook-registry"5924name = "signal-hook-registry"
5085version = "1.2.0"5925version = "1.2.1"
5086source = "registry+https://github.com/rust-lang/crates.io-index"5926source = "registry+https://github.com/rust-lang/crates.io-index"
5087checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41"5927checksum = "a3e12110bc539e657a646068aaf5eb5b63af9d0c1f7b29c97113fad80e15f035"
5088dependencies = [5928dependencies = [
5089 "arc-swap",5929 "arc-swap",
5090 "libc",5930 "libc",
5091]5931]
5932
5933[[package]]
5934name = "signature"
5935version = "1.2.2"
5936source = "registry+https://github.com/rust-lang/crates.io-index"
5937checksum = "29f060a7d147e33490ec10da418795238fd7545bba241504d6b31a409f2e6210"
50925938
5093[[package]]5939[[package]]
5094name = "slab"5940name = "slab"
5136checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b"5982checksum = "a945ec7f7ce853e89ffa36be1e27dce9a43e82ff9093bf3461c30d5da74ed11b"
5137dependencies = [5983dependencies = [
5138 "proc-macro2",5984 "proc-macro2",
5139 "quote 1.0.7",5985 "quote",
5140 "syn 1.0.34",5986 "syn",
5141]5987]
51425988
5143[[package]]5989[[package]]
51515997
5152[[package]]5998[[package]]
5153name = "smallvec"5999name = "smallvec"
5154version = "1.4.1"6000version = "1.4.2"
5155source = "registry+https://github.com/rust-lang/crates.io-index"6001source = "registry+https://github.com/rust-lang/crates.io-index"
5156checksum = "3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f"6002checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252"
51576003
5158[[package]]6004[[package]]
5159name = "snow"6005name = "snow"
5160version = "0.7.1"6006version = "0.7.2"
5161source = "registry+https://github.com/rust-lang/crates.io-index"6007source = "registry+https://github.com/rust-lang/crates.io-index"
5162checksum = "32bf8474159a95551661246cda4976e89356999e3cbfef36f493dacc3fae1e8e"6008checksum = "795dd7aeeee24468e5a32661f6d27f7b5cbed802031b2d7640c7b10f8fb2dd50"
5163dependencies = [6009dependencies = [
5164 "aes-gcm",6010 "aes-gcm",
5165 "blake2 0.9.0",6011 "blake2",
5166 "chacha20poly1305",6012 "chacha20poly1305",
5167 "rand 0.7.3",6013 "rand 0.7.3",
5168 "rand_core 0.5.1",6014 "rand_core 0.5.1",
5169 "ring",6015 "ring",
5170 "rustc_version",6016 "rustc_version",
5171 "sha2 0.9.1",6017 "sha2 0.9.1",
5172 "subtle 2.2.3",6018 "subtle 2.3.0",
5173 "x25519-dalek",6019 "x25519-dalek 1.1.0",
5174]6020]
51756021
5176[[package]]6022[[package]]
5177name = "socket2"6023name = "socket2"
5178version = "0.3.12"6024version = "0.3.15"
5179source = "registry+https://github.com/rust-lang/crates.io-index"6025source = "registry+https://github.com/rust-lang/crates.io-index"
5180checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"6026checksum = "b1fa70dc5c8104ec096f4fe7ede7a221d35ae13dcd19ba1ad9a81d2cab9a1c44"
5181dependencies = [6027dependencies = [
5182 "cfg-if",6028 "cfg-if 0.1.10",
5183 "libc",6029 "libc",
5184 "redox_syscall",6030 "redox_syscall",
5185 "winapi 0.3.9",6031 "winapi 0.3.9",
5186]6032]
51876033
5188[[package]]6034[[package]]
5189name = "soketto"6035name = "soketto"
5190version = "0.3.2"6036version = "0.4.2"
5191source = "registry+https://github.com/rust-lang/crates.io-index"6037source = "registry+https://github.com/rust-lang/crates.io-index"
5192checksum = "1c9dab3f95c9ebdf3a88268c19af668f637a3c5039c2c56ff2d40b1b2d64a25b"6038checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88"
5193dependencies = [6039dependencies = [
5194 "base64",6040 "base64 0.12.3",
5195 "bytes 0.5.6",6041 "bytes 0.5.6",
5196 "flate2",6042 "flate2",
5197 "futures 0.3.5",6043 "futures 0.3.6",
5198 "http 0.2.1",
5199 "httparse",6044 "httparse",
5200 "log",6045 "log",
5201 "rand 0.7.3",6046 "rand 0.7.3",
5202 "sha1",
5203 "smallvec 1.4.1",6047 "sha-1 0.9.1",
5204 "static_assertions",
5205 "thiserror",
5206]6048]
52076049
5208[[package]]6050[[package]]
5209name = "sp-allocator"6051name = "sp-allocator"
5210version = "2.0.0-rc4"6052version = "2.0.0"
5211source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6053source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5212dependencies = [6054dependencies = [
5213 "derive_more",6055 "derive_more",
5214 "log",6056 "log",
52196061
5220[[package]]6062[[package]]
5221name = "sp-api"6063name = "sp-api"
5222version = "2.0.0-rc4"6064version = "2.0.0"
5223source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6065source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5224dependencies = [6066dependencies = [
5225 "hash-db",6067 "hash-db",
5226 "parity-scale-codec",6068 "parity-scale-codec",
52346076
5235[[package]]6077[[package]]
5236name = "sp-api-proc-macro"6078name = "sp-api-proc-macro"
5237version = "2.0.0-rc4"6079version = "2.0.0"
5238source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6080source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5239dependencies = [6081dependencies = [
5240 "blake2-rfc",6082 "blake2-rfc",
5241 "proc-macro-crate",6083 "proc-macro-crate",
5242 "proc-macro2",6084 "proc-macro2",
5243 "quote 1.0.7",6085 "quote",
5244 "syn 1.0.34",6086 "syn",
5245]6087]
52466088
5247[[package]]6089[[package]]
5248name = "sp-application-crypto"6090name = "sp-application-crypto"
5249version = "2.0.0-rc4"6091version = "2.0.0"
5250source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6092source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5251dependencies = [6093dependencies = [
5252 "parity-scale-codec",6094 "parity-scale-codec",
5253 "serde",6095 "serde",
52586100
5259[[package]]6101[[package]]
5260name = "sp-arithmetic"6102name = "sp-arithmetic"
5261version = "2.0.0-rc4"6103version = "2.0.0"
5262source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6104source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5263dependencies = [6105dependencies = [
5264 "integer-sqrt",6106 "integer-sqrt",
5265 "num-traits 0.2.12",6107 "num-traits",
5266 "parity-scale-codec",6108 "parity-scale-codec",
5267 "serde",6109 "serde",
5268 "sp-debug-derive",6110 "sp-debug-derive",
5269 "sp-std",6111 "sp-std",
5270]6112]
6113
6114[[package]]
6115name = "sp-authorship"
6116version = "2.0.0"
6117source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
6118dependencies = [
6119 "parity-scale-codec",
6120 "sp-inherents",
6121 "sp-runtime",
6122 "sp-std",
6123]
52716124
5272[[package]]6125[[package]]
5273name = "sp-block-builder"6126name = "sp-block-builder"
5274version = "2.0.0-rc4"6127version = "2.0.0"
5275source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6128source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5276dependencies = [6129dependencies = [
5277 "parity-scale-codec",6130 "parity-scale-codec",
5278 "sp-api",6131 "sp-api",
52836136
5284[[package]]6137[[package]]
5285name = "sp-blockchain"6138name = "sp-blockchain"
5286version = "2.0.0-rc4"6139version = "2.0.0"
5287source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6140source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5288dependencies = [6141dependencies = [
5289 "derive_more",6142 "derive_more",
5290 "log",6143 "log",
5291 "lru",6144 "lru 0.4.3",
5292 "parity-scale-codec",6145 "parity-scale-codec",
5293 "parking_lot 0.10.2",6146 "parking_lot 0.10.2",
5294 "sp-block-builder",6147 "sp-block-builder",
5295 "sp-consensus",6148 "sp-consensus",
6149 "sp-database",
5296 "sp-runtime",6150 "sp-runtime",
5297 "sp-state-machine",6151 "sp-state-machine",
5298]6152]
52996153
5300[[package]]6154[[package]]
5301name = "sp-chain-spec"6155name = "sp-chain-spec"
5302version = "2.0.0-rc4"6156version = "2.0.0"
5303source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6157source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5304dependencies = [6158dependencies = [
5305 "serde",6159 "serde",
5306 "serde_json",6160 "serde_json",
5307]6161]
53086162
5309[[package]]6163[[package]]
5310name = "sp-consensus"6164name = "sp-consensus"
5311version = "0.8.0-rc4"6165version = "0.8.0"
5312source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6166source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5313dependencies = [6167dependencies = [
5314 "derive_more",6168 "derive_more",
5315 "futures 0.3.5",6169 "futures 0.3.6",
5316 "futures-timer 3.0.2",6170 "futures-timer 3.0.2",
5317 "libp2p",6171 "libp2p",
5318 "log",6172 "log",
5319 "parity-scale-codec",6173 "parity-scale-codec",
5320 "parking_lot 0.10.2",6174 "parking_lot 0.10.2",
5321 "serde",6175 "serde",
6176 "sp-api",
5322 "sp-core",6177 "sp-core",
5323 "sp-inherents",6178 "sp-inherents",
5324 "sp-runtime",6179 "sp-runtime",
5325 "sp-state-machine",6180 "sp-state-machine",
5326 "sp-std",6181 "sp-std",
6182 "sp-trie",
5327 "sp-utils",6183 "sp-utils",
5328 "sp-version",6184 "sp-version",
5329 "substrate-prometheus-endpoint",6185 "substrate-prometheus-endpoint",
53326188
5333[[package]]6189[[package]]
5334name = "sp-consensus-aura"6190name = "sp-consensus-aura"
5335version = "0.8.0-rc4"6191version = "0.8.0"
5336source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6192source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5337dependencies = [6193dependencies = [
5338 "parity-scale-codec",6194 "parity-scale-codec",
5339 "sp-api",6195 "sp-api",
5344 "sp-timestamp",6200 "sp-timestamp",
5345]6201]
6202
6203[[package]]
6204name = "sp-consensus-slots"
6205version = "0.8.0"
6206source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
6207dependencies = [
6208 "parity-scale-codec",
6209 "sp-runtime",
6210]
53466211
5347[[package]]6212[[package]]
5348name = "sp-core"6213name = "sp-core"
5349version = "2.0.0-rc4"6214version = "2.0.0"
5350source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6215source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5351dependencies = [6216dependencies = [
5352 "base58",6217 "base58",
5353 "blake2-rfc",6218 "blake2-rfc",
5354 "byteorder",6219 "byteorder 1.3.4",
5355 "derive_more",6220 "derive_more",
6221 "dyn-clonable",
5356 "ed25519-dalek",6222 "ed25519-dalek",
5357 "futures 0.3.5",6223 "futures 0.3.6",
5358 "hash-db",6224 "hash-db",
5359 "hash256-std-hasher",6225 "hash256-std-hasher",
5360 "hex",6226 "hex",
5361 "impl-serde 0.3.1",6227 "impl-serde",
5362 "lazy_static",6228 "lazy_static",
5363 "libsecp256k1",6229 "libsecp256k1",
5364 "log",6230 "log",
5365 "merlin",6231 "merlin",
5366 "num-traits 0.2.12",6232 "num-traits",
5367 "parity-scale-codec",6233 "parity-scale-codec",
5368 "parity-util-mem",6234 "parity-util-mem",
5369 "parking_lot 0.10.2",6235 "parking_lot 0.10.2",
5370 "primitive-types",6236 "primitive-types",
5371 "rand 0.7.3",6237 "rand 0.7.3",
5372 "regex",6238 "regex",
5373 "schnorrkel",6239 "schnorrkel",
6240 "secrecy",
5374 "serde",6241 "serde",
5375 "sha2 0.8.2",6242 "sha2 0.8.2",
5376 "sp-debug-derive",6243 "sp-debug-derive",
53886255
5389[[package]]6256[[package]]
5390name = "sp-database"6257name = "sp-database"
5391version = "2.0.0-rc4"6258version = "2.0.0"
5392source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6259source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5393dependencies = [6260dependencies = [
5394 "kvdb",6261 "kvdb",
5395 "parking_lot 0.10.2",6262 "parking_lot 0.10.2",
5396]6263]
53976264
5398[[package]]6265[[package]]
5399name = "sp-debug-derive"6266name = "sp-debug-derive"
5400version = "2.0.0-rc4"6267version = "2.0.0"
5401source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6268source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5402dependencies = [6269dependencies = [
5403 "proc-macro2",6270 "proc-macro2",
5404 "quote 1.0.7",6271 "quote",
5405 "syn 1.0.34",6272 "syn",
5406]6273]
54076274
5408[[package]]6275[[package]]
5409name = "sp-externalities"6276name = "sp-externalities"
5410version = "0.8.0-rc4"6277version = "0.8.0"
5411source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6278source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5412dependencies = [6279dependencies = [
5413 "environmental",6280 "environmental",
5414 "parity-scale-codec",6281 "parity-scale-codec",
54186285
5419[[package]]6286[[package]]
5420name = "sp-finality-grandpa"6287name = "sp-finality-grandpa"
5421version = "2.0.0-rc4"6288version = "2.0.0"
5422source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6289source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5423dependencies = [6290dependencies = [
5424 "finality-grandpa",6291 "finality-grandpa",
5425 "log",6292 "log",
54346301
5435[[package]]6302[[package]]
5436name = "sp-finality-tracker"6303name = "sp-finality-tracker"
5437version = "2.0.0-rc4"6304version = "2.0.0"
5438source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6305source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5439dependencies = [6306dependencies = [
5440 "parity-scale-codec",6307 "parity-scale-codec",
5441 "sp-inherents",6308 "sp-inherents",
54446311
5445[[package]]6312[[package]]
5446name = "sp-inherents"6313name = "sp-inherents"
5447version = "2.0.0-rc4"6314version = "2.0.0"
5448source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6315source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5449dependencies = [6316dependencies = [
5450 "derive_more",6317 "derive_more",
5451 "parity-scale-codec",6318 "parity-scale-codec",
54566323
5457[[package]]6324[[package]]
5458name = "sp-io"6325name = "sp-io"
5459version = "2.0.0-rc4"6326version = "2.0.0"
5460source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6327source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5461dependencies = [6328dependencies = [
5462 "futures 0.3.5",6329 "futures 0.3.6",
5463 "hash-db",6330 "hash-db",
5464 "libsecp256k1",6331 "libsecp256k1",
5465 "log",6332 "log",
5473 "sp-tracing",6340 "sp-tracing",
5474 "sp-trie",6341 "sp-trie",
5475 "sp-wasm-interface",6342 "sp-wasm-interface",
6343 "tracing",
6344 "tracing-core",
5476]6345]
54776346
5478[[package]]6347[[package]]
5479name = "sp-keyring"6348name = "sp-keyring"
5480version = "2.0.0-rc4"6349version = "2.0.0"
5481source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6350source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5482dependencies = [6351dependencies = [
5483 "lazy_static",6352 "lazy_static",
5484 "sp-core",6353 "sp-core",
54886357
5489[[package]]6358[[package]]
5490name = "sp-offchain"6359name = "sp-offchain"
5491version = "2.0.0-rc4"6360version = "2.0.0"
5492source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6361source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5493dependencies = [6362dependencies = [
5494 "sp-api",6363 "sp-api",
5495 "sp-core",6364 "sp-core",
54986367
5499[[package]]6368[[package]]
5500name = "sp-panic-handler"6369name = "sp-panic-handler"
5501version = "2.0.0-rc4"6370version = "2.0.0"
5502source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6371source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5503dependencies = [6372dependencies = [
5504 "backtrace",6373 "backtrace",
5505 "log",6374 "log",
5506]6375]
55076376
5508[[package]]6377[[package]]
5509name = "sp-rpc"6378name = "sp-rpc"
5510version = "2.0.0-rc4"6379version = "2.0.0"
5511source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6380source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5512dependencies = [6381dependencies = [
5513 "serde",6382 "serde",
5514 "sp-core",6383 "sp-core",
5515]6384]
55166385
5517[[package]]6386[[package]]
5518name = "sp-runtime"6387name = "sp-runtime"
5519version = "2.0.0-rc4"6388version = "2.0.0"
5520source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6389source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5521dependencies = [6390dependencies = [
5522 "either",6391 "either",
5523 "hash256-std-hasher",6392 "hash256-std-hasher",
55386407
5539[[package]]6408[[package]]
5540name = "sp-runtime-interface"6409name = "sp-runtime-interface"
5541version = "2.0.0-rc4"6410version = "2.0.0"
5542source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6411source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5543dependencies = [6412dependencies = [
5544 "parity-scale-codec",6413 "parity-scale-codec",
5545 "primitive-types",6414 "primitive-types",
5546 "sp-externalities",6415 "sp-externalities",
5547 "sp-runtime-interface-proc-macro",6416 "sp-runtime-interface-proc-macro",
5548 "sp-std",6417 "sp-std",
6418 "sp-storage",
5549 "sp-tracing",6419 "sp-tracing",
5550 "sp-wasm-interface",6420 "sp-wasm-interface",
5551 "static_assertions",6421 "static_assertions",
5552]6422]
55536423
5554[[package]]6424[[package]]
5555name = "sp-runtime-interface-proc-macro"6425name = "sp-runtime-interface-proc-macro"
5556version = "2.0.0-rc4"6426version = "2.0.0"
5557source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6427source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5558dependencies = [6428dependencies = [
5559 "Inflector",6429 "Inflector",
5560 "proc-macro-crate",6430 "proc-macro-crate",
5561 "proc-macro2",6431 "proc-macro2",
5562 "quote 1.0.7",6432 "quote",
5563 "syn 1.0.34",6433 "syn",
5564]6434]
55656435
5566[[package]]6436[[package]]
5567name = "sp-sandbox"6437name = "sp-sandbox"
5568version = "0.8.0-rc4"6438version = "0.8.0"
5569source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6439source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5570dependencies = [6440dependencies = [
5571 "parity-scale-codec",6441 "parity-scale-codec",
5572 "sp-core",6442 "sp-core",
55786448
5579[[package]]6449[[package]]
5580name = "sp-serializer"6450name = "sp-serializer"
5581version = "2.0.0-rc4"6451version = "2.0.0"
5582source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6452source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5583dependencies = [6453dependencies = [
5584 "serde",6454 "serde",
5585 "serde_json",6455 "serde_json",
5586]6456]
55876457
5588[[package]]6458[[package]]
5589name = "sp-session"6459name = "sp-session"
5590version = "2.0.0-rc4"6460version = "2.0.0"
5591source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6461source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5592dependencies = [6462dependencies = [
5593 "parity-scale-codec",6463 "parity-scale-codec",
5594 "sp-api",6464 "sp-api",
56006470
5601[[package]]6471[[package]]
5602name = "sp-staking"6472name = "sp-staking"
5603version = "2.0.0-rc4"6473version = "2.0.0"
5604source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6474source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5605dependencies = [6475dependencies = [
5606 "parity-scale-codec",6476 "parity-scale-codec",
5607 "sp-runtime",6477 "sp-runtime",
56106480
5611[[package]]6481[[package]]
5612name = "sp-state-machine"6482name = "sp-state-machine"
5613version = "0.8.0-rc4"6483version = "0.8.0"
5614source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6484source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5615dependencies = [6485dependencies = [
5616 "hash-db",6486 "hash-db",
5617 "itertools 0.9.0",
5618 "log",6487 "log",
5619 "num-traits 0.2.12",6488 "num-traits",
5620 "parity-scale-codec",6489 "parity-scale-codec",
5621 "parking_lot 0.10.2",6490 "parking_lot 0.10.2",
5622 "rand 0.7.3",6491 "rand 0.7.3",
5623 "smallvec 1.4.1",6492 "smallvec 1.4.2",
5624 "sp-core",6493 "sp-core",
5625 "sp-externalities",6494 "sp-externalities",
5626 "sp-panic-handler",6495 "sp-panic-handler",
6496 "sp-std",
5627 "sp-trie",6497 "sp-trie",
5628 "trie-db",6498 "trie-db",
5629 "trie-root",6499 "trie-root",
5630]6500]
56316501
5632[[package]]6502[[package]]
5633name = "sp-std"6503name = "sp-std"
5634version = "2.0.0-rc4"6504version = "2.0.0"
5635source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6505source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
56366506
5637[[package]]6507[[package]]
5638name = "sp-storage"6508name = "sp-storage"
5639version = "2.0.0-rc4"6509version = "2.0.0"
5640source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6510source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5641dependencies = [6511dependencies = [
5642 "impl-serde 0.2.3",6512 "impl-serde",
6513 "parity-scale-codec",
5643 "ref-cast",6514 "ref-cast",
5644 "serde",6515 "serde",
5645 "sp-debug-derive",6516 "sp-debug-derive",
56486519
5649[[package]]6520[[package]]
5650name = "sp-timestamp"6521name = "sp-timestamp"
5651version = "2.0.0-rc4"6522version = "2.0.0"
5652source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6523source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5653dependencies = [6524dependencies = [
5654 "impl-trait-for-tuples",6525 "impl-trait-for-tuples",
5655 "parity-scale-codec",6526 "parity-scale-codec",
56626533
5663[[package]]6534[[package]]
5664name = "sp-tracing"6535name = "sp-tracing"
5665version = "2.0.0-rc4"6536version = "2.0.0"
5666source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6537source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5667dependencies = [6538dependencies = [
5668 "log",6539 "log",
5669 "rental",6540 "parity-scale-codec",
6541 "sp-std",
5670 "tracing",6542 "tracing",
6543 "tracing-core",
6544 "tracing-subscriber",
5671]6545]
56726546
5673[[package]]6547[[package]]
5674name = "sp-transaction-pool"6548name = "sp-transaction-pool"
5675version = "2.0.0-rc4"6549version = "2.0.0"
5676source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6550source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5677dependencies = [6551dependencies = [
5678 "derive_more",6552 "derive_more",
5679 "futures 0.3.5",6553 "futures 0.3.6",
5680 "log",6554 "log",
5681 "parity-scale-codec",6555 "parity-scale-codec",
5682 "serde",6556 "serde",
5683 "sp-api",6557 "sp-api",
5684 "sp-blockchain",6558 "sp-blockchain",
5685 "sp-runtime",6559 "sp-runtime",
5686 "sp-utils",
5687]6560]
56886561
5689[[package]]6562[[package]]
5690name = "sp-trie"6563name = "sp-trie"
5691version = "2.0.0-rc4"6564version = "2.0.0"
5692source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6565source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5693dependencies = [6566dependencies = [
5694 "hash-db",6567 "hash-db",
5695 "memory-db",6568 "memory-db",
57026575
5703[[package]]6576[[package]]
5704name = "sp-utils"6577name = "sp-utils"
5705version = "2.0.0-rc4"6578version = "2.0.0"
5706source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6579source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5707dependencies = [6580dependencies = [
5708 "futures 0.3.5",6581 "futures 0.3.6",
5709 "futures-core",6582 "futures-core",
5710 "futures-timer 3.0.2",6583 "futures-timer 3.0.2",
5711 "lazy_static",6584 "lazy_static",
57146587
5715[[package]]6588[[package]]
5716name = "sp-version"6589name = "sp-version"
5717version = "2.0.0-rc4"6590version = "2.0.0"
5718source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6591source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5719dependencies = [6592dependencies = [
5720 "impl-serde 0.2.3",6593 "impl-serde",
5721 "parity-scale-codec",6594 "parity-scale-codec",
5722 "serde",6595 "serde",
5723 "sp-runtime",6596 "sp-runtime",
57266599
5727[[package]]6600[[package]]
5728name = "sp-wasm-interface"6601name = "sp-wasm-interface"
5729version = "2.0.0-rc4"6602version = "2.0.0"
5730source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6603source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5731dependencies = [6604dependencies = [
5732 "impl-trait-for-tuples",6605 "impl-trait-for-tuples",
5733 "parity-scale-codec",6606 "parity-scale-codec",
5762 "rand 0.5.6",6635 "rand 0.5.6",
5763]6636]
6637
6638[[package]]
6639name = "stream-cipher"
6640version = "0.3.2"
6641source = "registry+https://github.com/rust-lang/crates.io-index"
6642checksum = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c"
6643dependencies = [
6644 "generic-array 0.12.3",
6645]
57646646
5765[[package]]6647[[package]]
5766name = "stream-cipher"6648name = "stream-cipher"
5767version = "0.4.1"6649version = "0.7.1"
5768source = "registry+https://github.com/rust-lang/crates.io-index"6650source = "registry+https://github.com/rust-lang/crates.io-index"
5769checksum = "09f8ed9974042b8c3672ff3030a69fcc03b74c47c3d1ecb7755e8a3626011e88"6651checksum = "c80e15f898d8d8f25db24c253ea615cc14acf418ff307822995814e7d42cfa89"
5770dependencies = [6652dependencies = [
6653 "block-cipher",
5771 "generic-array 0.14.3",6654 "generic-array 0.14.4",
5772]6655]
57736656
5774[[package]]6657[[package]]
57886671
5789[[package]]6672[[package]]
5790name = "structopt"6673name = "structopt"
5791version = "0.3.15"6674version = "0.3.20"
5792source = "registry+https://github.com/rust-lang/crates.io-index"6675source = "registry+https://github.com/rust-lang/crates.io-index"
5793checksum = "de2f5e239ee807089b62adce73e48c625e0ed80df02c7ab3f068f5db5281065c"6676checksum = "126d630294ec449fae0b16f964e35bf3c74f940da9dca17ee9b905f7b3112eb8"
5794dependencies = [6677dependencies = [
5795 "clap",6678 "clap",
5796 "lazy_static",6679 "lazy_static",
57996682
5800[[package]]6683[[package]]
5801name = "structopt-derive"6684name = "structopt-derive"
5802version = "0.4.8"6685version = "0.4.13"
5803source = "registry+https://github.com/rust-lang/crates.io-index"6686source = "registry+https://github.com/rust-lang/crates.io-index"
5804checksum = "510413f9de616762a4fbeab62509bf15c729603b72d7cd71280fbca431b1c118"6687checksum = "65e51c492f9e23a220534971ff5afc14037289de430e3c83f9daf6a1b6ae91e8"
5805dependencies = [6688dependencies = [
5806 "heck",6689 "heck",
5807 "proc-macro-error",6690 "proc-macro-error",
5808 "proc-macro2",6691 "proc-macro2",
5809 "quote 1.0.7",6692 "quote",
5810 "syn 1.0.34",6693 "syn",
5811]6694]
58126695
5813[[package]]6696[[package]]
5827dependencies = [6710dependencies = [
5828 "heck",6711 "heck",
5829 "proc-macro2",6712 "proc-macro2",
5830 "quote 1.0.7",6713 "quote",
5831 "syn 1.0.34",6714 "syn",
5832]6715]
58336716
5834[[package]]6717[[package]]
5835name = "substrate-bip39"6718name = "substrate-bip39"
5836version = "0.4.1"6719version = "0.4.2"
5837source = "registry+https://github.com/rust-lang/crates.io-index"6720source = "registry+https://github.com/rust-lang/crates.io-index"
5838checksum = "c004e8166d6e0aa3a9d5fa673e5b7098ff25f930de1013a21341988151e681bb"6721checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236"
5839dependencies = [6722dependencies = [
5840 "hmac",6723 "hmac",
5841 "pbkdf2",6724 "pbkdf2",
5842 "schnorrkel",6725 "schnorrkel",
5843 "sha2 0.8.2",6726 "sha2 0.8.2",
6727 "zeroize",
5844]6728]
58456729
5846[[package]]6730[[package]]
5847name = "substrate-build-script-utils"6731name = "substrate-build-script-utils"
5848version = "2.0.0-rc4"6732version = "2.0.0"
5849source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6733source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5850dependencies = [6734dependencies = [
5851 "platforms",6735 "platforms",
5852]6736]
6737
6738[[package]]
6739name = "substrate-frame-rpc-system"
6740version = "2.0.0"
6741source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
6742dependencies = [
6743 "frame-system-rpc-runtime-api",
6744 "futures 0.3.6",
6745 "jsonrpc-core",
6746 "jsonrpc-core-client",
6747 "jsonrpc-derive",
6748 "log",
6749 "parity-scale-codec",
6750 "sc-client-api",
6751 "sc-rpc-api",
6752 "serde",
6753 "sp-api",
6754 "sp-block-builder",
6755 "sp-blockchain",
6756 "sp-core",
6757 "sp-runtime",
6758 "sp-transaction-pool",
6759]
58536760
5854[[package]]6761[[package]]
5855name = "substrate-prometheus-endpoint"6762name = "substrate-prometheus-endpoint"
5856version = "0.8.0-rc4"6763version = "0.8.0"
5857source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6764source = "git+https://github.com/usetech-llc/substrate.git?branch=v2.0.0_release#a200cdb93c6af5763b9c7bf313fa708764ac88ca"
5858dependencies = [6765dependencies = [
5859 "async-std",6766 "async-std",
5860 "derive_more",6767 "derive_more",
5861 "futures-util",6768 "futures-util",
5862 "hyper 0.13.7",6769 "hyper 0.13.8",
5863 "log",6770 "log",
5864 "prometheus",6771 "prometheus",
5865 "tokio 0.2.21",6772 "tokio 0.2.22",
5866]6773]
58676774
5868[[package]]6775[[package]]
5869name = "substrate-wasm-builder-runner"6776name = "substrate-wasm-builder-runner"
5870version = "1.0.6"6777version = "1.0.6"
5871source = "git+https://github.com/usetech-llc/substrate.git?branch=rc4_ext_dispatch_reenabled#b161460bf73e4cc73e29b8e01ab0323bb3d95e84"6778source = "registry+https://github.com/rust-lang/crates.io-index"
6779checksum = "d2a965994514ab35d3893e9260245f2947fd1981cdd4fffd2c6e6d1a9ce02e6a"
58726780
5873[[package]]6781[[package]]
5874name = "subtle"6782name = "subtle"
58786786
5879[[package]]6787[[package]]
5880name = "subtle"6788name = "subtle"
5881version = "2.2.3"6789version = "2.3.0"
5882source = "registry+https://github.com/rust-lang/crates.io-index"6790source = "registry+https://github.com/rust-lang/crates.io-index"
5883checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1"6791checksum = "343f3f510c2915908f155e94f17220b19ccfacf2a64a2a5d8004f2c3e311e7fd"
5884
5885[[package]]
5886name = "syn"
5887version = "0.11.11"
5888source = "registry+https://github.com/rust-lang/crates.io-index"
5889checksum = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
5890dependencies = [
5891 "quote 0.3.15",
5892 "synom",
5893 "unicode-xid 0.0.4",
5894]
58956792
5896[[package]]6793[[package]]
5897name = "syn"6794name = "syn"
5898version = "1.0.34"6795version = "1.0.44"
5899source = "registry+https://github.com/rust-lang/crates.io-index"6796source = "registry+https://github.com/rust-lang/crates.io-index"
5900checksum = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b"6797checksum = "e03e57e4fcbfe7749842d53e24ccb9aa12b7252dbe5e91d2acad31834c8b8fdd"
5901dependencies = [6798dependencies = [
5902 "proc-macro2",6799 "proc-macro2",
5903 "quote 1.0.7",6800 "quote",
5904 "unicode-xid 0.2.1",6801 "unicode-xid",
5905]6802]
5906
5907[[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]
59266803
5927[[package]]6804[[package]]
5928name = "synstructure"6805name = "synstructure"
5931checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"6808checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
5932dependencies = [6809dependencies = [
5933 "proc-macro2",6810 "proc-macro2",
5934 "quote 1.0.7",6811 "quote",
5935 "syn 1.0.34",6812 "syn",
5936 "unicode-xid 0.2.1",6813 "unicode-xid",
5937]6814]
5938
5939[[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]
59536815
5954[[package]]6816[[package]]
5955name = "take_mut"6817name = "take_mut"
5956version = "0.2.2"6818version = "0.2.2"
5957source = "registry+https://github.com/rust-lang/crates.io-index"6819source = "registry+https://github.com/rust-lang/crates.io-index"
5958checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60"6820checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60"
6821
6822[[package]]
6823name = "target-lexicon"
6824version = "0.10.0"
6825source = "registry+https://github.com/rust-lang/crates.io-index"
6826checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d"
59596827
5960[[package]]6828[[package]]
5961name = "tempfile"6829name = "tempfile"
5962version = "3.1.0"6830version = "3.1.0"
5963source = "registry+https://github.com/rust-lang/crates.io-index"6831source = "registry+https://github.com/rust-lang/crates.io-index"
5964checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"6832checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
5965dependencies = [6833dependencies = [
5966 "cfg-if",6834 "cfg-if 0.1.10",
5967 "libc",6835 "libc",
5968 "rand 0.7.3",6836 "rand 0.7.3",
5969 "redox_syscall",6837 "redox_syscall",
59916859
5992[[package]]6860[[package]]
5993name = "thiserror"6861name = "thiserror"
5994version = "1.0.20"6862version = "1.0.21"
5995source = "registry+https://github.com/rust-lang/crates.io-index"6863source = "registry+https://github.com/rust-lang/crates.io-index"
5996checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08"6864checksum = "318234ffa22e0920fe9a40d7b8369b5f649d490980cf7aadcf1eb91594869b42"
5997dependencies = [6865dependencies = [
5998 "thiserror-impl",6866 "thiserror-impl",
5999]6867]
60006868
6001[[package]]6869[[package]]
6002name = "thiserror-impl"6870name = "thiserror-impl"
6003version = "1.0.20"6871version = "1.0.21"
6004source = "registry+https://github.com/rust-lang/crates.io-index"6872source = "registry+https://github.com/rust-lang/crates.io-index"
6005checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793"6873checksum = "cae2447b6282786c3493999f40a9be2a6ad20cb8bd268b0a0dbf5a065535c0ab"
6006dependencies = [6874dependencies = [
6007 "proc-macro2",6875 "proc-macro2",
6008 "quote 1.0.7",6876 "quote",
6009 "syn 1.0.34",6877 "syn",
6010]6878]
60116879
6012[[package]]6880[[package]]
60296897
6030[[package]]6898[[package]]
6031name = "time"6899name = "time"
6032version = "0.1.43"6900version = "0.1.44"
6033source = "registry+https://github.com/rust-lang/crates.io-index"6901source = "registry+https://github.com/rust-lang/crates.io-index"
6034checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"6902checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
6035dependencies = [6903dependencies = [
6036 "libc",6904 "libc",
6905 "wasi 0.10.0+wasi-snapshot-preview1",
6037 "winapi 0.3.9",6906 "winapi 0.3.9",
6038]6907]
60396908
6045dependencies = [6914dependencies = [
6046 "failure",6915 "failure",
6047 "hmac",6916 "hmac",
6048 "once_cell",6917 "once_cell 1.4.1",
6049 "pbkdf2",6918 "pbkdf2",
6050 "rand 0.7.3",6919 "rand 0.7.3",
6051 "rustc-hash",6920 "rustc-hash",
60646933
6065[[package]]6934[[package]]
6066name = "tinyvec"6935name = "tinyvec"
6067version = "0.3.3"6936version = "0.3.4"
6068source = "registry+https://github.com/rust-lang/crates.io-index"6937source = "registry+https://github.com/rust-lang/crates.io-index"
6069checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed"6938checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117"
60706939
6071[[package]]6940[[package]]
6072name = "tokio"6941name = "tokio"
6075checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6"6944checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6"
6076dependencies = [6945dependencies = [
6077 "bytes 0.4.12",6946 "bytes 0.4.12",
6078 "futures 0.1.29",6947 "futures 0.1.30",
6079 "mio",6948 "mio",
6080 "num_cpus",6949 "num_cpus",
6081 "tokio-codec",6950 "tokio-codec",
60946963
6095[[package]]6964[[package]]
6096name = "tokio"6965name = "tokio"
6097version = "0.2.21"6966version = "0.2.22"
6098source = "registry+https://github.com/rust-lang/crates.io-index"6967source = "registry+https://github.com/rust-lang/crates.io-index"
6099checksum = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58"6968checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd"
6100dependencies = [6969dependencies = [
6101 "bytes 0.5.6",6970 "bytes 0.5.6",
6102 "fnv",6971 "fnv",
6122dependencies = [6991dependencies = [
6123 "bytes 0.4.12",6992 "bytes 0.4.12",
6124 "either",6993 "either",
6125 "futures 0.1.29",6994 "futures 0.1.30",
6126]6995]
61276996
6128[[package]]6997[[package]]
6132checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b"7001checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b"
6133dependencies = [7002dependencies = [
6134 "bytes 0.4.12",7003 "bytes 0.4.12",
6135 "futures 0.1.29",7004 "futures 0.1.30",
6136 "tokio-io",7005 "tokio-io",
6137]7006]
61387007
6142source = "registry+https://github.com/rust-lang/crates.io-index"7011source = "registry+https://github.com/rust-lang/crates.io-index"
6143checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e"7012checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e"
6144dependencies = [7013dependencies = [
6145 "futures 0.1.29",7014 "futures 0.1.30",
6146 "tokio-executor 0.1.10",7015 "tokio-executor 0.1.10",
6147]7016]
61487017
6153checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671"7022checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671"
6154dependencies = [7023dependencies = [
6155 "crossbeam-utils",7024 "crossbeam-utils",
6156 "futures 0.1.29",7025 "futures 0.1.30",
6157]7026]
61587027
6159[[package]]7028[[package]]
6173source = "registry+https://github.com/rust-lang/crates.io-index"7042source = "registry+https://github.com/rust-lang/crates.io-index"
6174checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4"7043checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4"
6175dependencies = [7044dependencies = [
6176 "futures 0.1.29",7045 "futures 0.1.30",
6177 "tokio-io",7046 "tokio-io",
6178 "tokio-threadpool",7047 "tokio-threadpool",
6179]7048]
6185checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674"7054checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674"
6186dependencies = [7055dependencies = [
6187 "bytes 0.4.12",7056 "bytes 0.4.12",
6188 "futures 0.1.29",7057 "futures 0.1.30",
6189 "log",7058 "log",
6190]7059]
61917060
6196checksum = "9d282d483052288b2308ba5ee795f5673b159c9bdf63c385a05609da782a5eae"7065checksum = "9d282d483052288b2308ba5ee795f5673b159c9bdf63c385a05609da782a5eae"
6197dependencies = [7066dependencies = [
6198 "bytes 0.4.12",7067 "bytes 0.4.12",
6199 "futures 0.1.29",7068 "futures 0.1.30",
6200 "mio",7069 "mio",
6201 "mio-named-pipes",7070 "mio-named-pipes",
6202 "tokio 0.1.22",7071 "tokio 0.1.22",
6209checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351"7078checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351"
6210dependencies = [7079dependencies = [
6211 "crossbeam-utils",7080 "crossbeam-utils",
6212 "futures 0.1.29",7081 "futures 0.1.30",
6213 "lazy_static",7082 "lazy_static",
6214 "log",7083 "log",
6215 "mio",7084 "mio",
62237092
6224[[package]]7093[[package]]
6225name = "tokio-rustls"7094name = "tokio-rustls"
6226version = "0.13.1"7095version = "0.14.1"
6227source = "registry+https://github.com/rust-lang/crates.io-index"7096source = "registry+https://github.com/rust-lang/crates.io-index"
6228checksum = "15cb62a0d2770787abc96e99c1cd98fcf17f94959f3af63ca85bdfb203f051b4"7097checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a"
6229dependencies = [7098dependencies = [
6230 "futures-core",7099 "futures-core",
6231 "rustls",7100 "rustls",
6232 "tokio 0.2.21",7101 "tokio 0.2.22",
6233 "webpki",7102 "webpki",
6234]7103]
62357104
6239source = "registry+https://github.com/rust-lang/crates.io-index"7108source = "registry+https://github.com/rust-lang/crates.io-index"
6240checksum = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162"7109checksum = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162"
6241dependencies = [7110dependencies = [
6242 "futures 0.1.29",7111 "futures 0.1.30",
6243]7112]
62447113
6245[[package]]7114[[package]]
6249checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee"7118checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee"
6250dependencies = [7119dependencies = [
6251 "fnv",7120 "fnv",
6252 "futures 0.1.29",7121 "futures 0.1.30",
6253]7122]
62547123
6255[[package]]7124[[package]]
6270checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72"7139checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72"
6271dependencies = [7140dependencies = [
6272 "bytes 0.4.12",7141 "bytes 0.4.12",
6273 "futures 0.1.29",7142 "futures 0.1.30",
6274 "iovec",7143 "iovec",
6275 "mio",7144 "mio",
6276 "tokio-io",7145 "tokio-io",
6286 "crossbeam-deque",7155 "crossbeam-deque",
6287 "crossbeam-queue",7156 "crossbeam-queue",
6288 "crossbeam-utils",7157 "crossbeam-utils",
6289 "futures 0.1.29",7158 "futures 0.1.30",
6290 "lazy_static",7159 "lazy_static",
6291 "log",7160 "log",
6292 "num_cpus",7161 "num_cpus",
6301checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296"7170checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296"
6302dependencies = [7171dependencies = [
6303 "crossbeam-utils",7172 "crossbeam-utils",
6304 "futures 0.1.29",7173 "futures 0.1.30",
6305 "slab",7174 "slab",
6306 "tokio-executor 0.1.10",7175 "tokio-executor 0.1.10",
6307]7176]
6313checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"7182checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82"
6314dependencies = [7183dependencies = [
6315 "bytes 0.4.12",7184 "bytes 0.4.12",
6316 "futures 0.1.29",7185 "futures 0.1.30",
6317 "log",7186 "log",
6318 "mio",7187 "mio",
6319 "tokio-codec",7188 "tokio-codec",
6328checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0"7197checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0"
6329dependencies = [7198dependencies = [
6330 "bytes 0.4.12",7199 "bytes 0.4.12",
6331 "futures 0.1.29",7200 "futures 0.1.30",
6332 "iovec",7201 "iovec",
6333 "libc",7202 "libc",
6334 "log",7203 "log",
6350 "futures-sink",7219 "futures-sink",
6351 "log",7220 "log",
6352 "pin-project-lite",7221 "pin-project-lite",
6353 "tokio 0.2.21",7222 "tokio 0.2.22",
6354]7223]
63557224
6356[[package]]7225[[package]]
6357name = "toml"7226name = "toml"
6358version = "0.5.6"7227version = "0.5.7"
6359source = "registry+https://github.com/rust-lang/crates.io-index"7228source = "registry+https://github.com/rust-lang/crates.io-index"
6360checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a"7229checksum = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645"
6361dependencies = [7230dependencies = [
6362 "serde",7231 "serde",
6363]7232]
63707239
6371[[package]]7240[[package]]
6372name = "tracing"7241name = "tracing"
6373version = "0.1.16"7242version = "0.1.21"
6374source = "registry+https://github.com/rust-lang/crates.io-index"7243source = "registry+https://github.com/rust-lang/crates.io-index"
6375checksum = "c2e2a2de6b0d5cbb13fc21193a2296888eaab62b6044479aafb3c54c01c29fcd"7244checksum = "b0987850db3733619253fe60e17cb59b82d37c7e6c0236bb81e4d6b87c879f27"
6376dependencies = [7245dependencies = [
6377 "cfg-if",7246 "cfg-if 0.1.10",
6378 "log",7247 "log",
7248 "pin-project-lite",
6379 "tracing-attributes",7249 "tracing-attributes",
6380 "tracing-core",7250 "tracing-core",
6381]7251]
63827252
6383[[package]]7253[[package]]
6384name = "tracing-attributes"7254name = "tracing-attributes"
6385version = "0.1.9"7255version = "0.1.11"
6386source = "registry+https://github.com/rust-lang/crates.io-index"7256source = "registry+https://github.com/rust-lang/crates.io-index"
6387checksum = "f0693bf8d6f2bf22c690fc61a9d21ac69efdbb894a17ed596b9af0f01e64b84b"7257checksum = "80e0ccfc3378da0cce270c946b676a376943f5cd16aeba64568e7939806f4ada"
6388dependencies = [7258dependencies = [
6389 "proc-macro2",7259 "proc-macro2",
6390 "quote 1.0.7",7260 "quote",
6391 "syn 1.0.34",7261 "syn",
6392]7262]
63937263
6394[[package]]7264[[package]]
6395name = "tracing-core"7265name = "tracing-core"
6396version = "0.1.11"7266version = "0.1.17"
6397source = "registry+https://github.com/rust-lang/crates.io-index"7267source = "registry+https://github.com/rust-lang/crates.io-index"
6398checksum = "94ae75f0d28ae10786f3b1895c55fe72e79928fd5ccdebb5438c75e93fec178f"7268checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f"
6399dependencies = [7269dependencies = [
6400 "lazy_static",7270 "lazy_static",
6401]7271]
7272
7273[[package]]
7274name = "tracing-log"
7275version = "0.1.1"
7276source = "registry+https://github.com/rust-lang/crates.io-index"
7277checksum = "5e0f8c7178e13481ff6765bd169b33e8d554c5d2bbede5e32c356194be02b9b9"
7278dependencies = [
7279 "lazy_static",
7280 "log",
7281 "tracing-core",
7282]
7283
7284[[package]]
7285name = "tracing-serde"
7286version = "0.1.2"
7287source = "registry+https://github.com/rust-lang/crates.io-index"
7288checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b"
7289dependencies = [
7290 "serde",
7291 "tracing-core",
7292]
7293
7294[[package]]
7295name = "tracing-subscriber"
7296version = "0.2.13"
7297source = "registry+https://github.com/rust-lang/crates.io-index"
7298checksum = "4ef0a5e15477aa303afbfac3a44cba9b6430fdaad52423b1e6c0dbbe28c3eedd"
7299dependencies = [
7300 "ansi_term 0.12.1",
7301 "chrono",
7302 "lazy_static",
7303 "matchers",
7304 "regex",
7305 "serde",
7306 "serde_json",
7307 "sharded-slab",
7308 "smallvec 1.4.2",
7309 "thread_local",
7310 "tracing",
7311 "tracing-core",
7312 "tracing-log",
7313 "tracing-serde",
7314]
64027315
6403[[package]]7316[[package]]
6404name = "trie-db"7317name = "trie-db"
6405version = "0.21.0"7318version = "0.22.1"
6406source = "registry+https://github.com/rust-lang/crates.io-index"7319source = "registry+https://github.com/rust-lang/crates.io-index"
6407checksum = "cb230c24c741993b04cfccbabb45acff6f6480c5f00d3ed8794ea43db3a9d727"7320checksum = "9e55f7ace33d6237e14137e386f4e1672e2a5c6bbc97fef9f438581a143971f0"
6408dependencies = [7321dependencies = [
6409 "hash-db",7322 "hash-db",
6410 "hashbrown 0.6.3",7323 "hashbrown 0.8.2",
6411 "log",7324 "log",
6412 "rustc-hex",7325 "rustc-hex",
6413 "smallvec 1.4.1",7326 "smallvec 1.4.2",
6414]7327]
64157328
6416[[package]]7329[[package]]
64307343
6431[[package]]7344[[package]]
6432name = "twox-hash"7345name = "twox-hash"
6433version = "1.5.0"7346version = "1.6.0"
6434source = "registry+https://github.com/rust-lang/crates.io-index"7347source = "registry+https://github.com/rust-lang/crates.io-index"
6435checksum = "3bfd5b7557925ce778ff9b9ef90e3ade34c524b5ff10e239c69a42d546d2af56"7348checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"
6436dependencies = [7349dependencies = [
7350 "cfg-if 0.1.10",
6437 "rand 0.7.3",7351 "rand 0.7.3",
7352 "static_assertions",
6438]7353]
64397354
6440[[package]]7355[[package]]
64457360
6446[[package]]7361[[package]]
6447name = "uint"7362name = "uint"
6448version = "0.8.3"7363version = "0.8.5"
6449source = "registry+https://github.com/rust-lang/crates.io-index"7364source = "registry+https://github.com/rust-lang/crates.io-index"
6450checksum = "173cd16430c206dc1a430af8a89a0e9c076cf15cb42b4aedb10e8cc8fee73681"7365checksum = "9db035e67dfaf7edd9aebfe8676afcd63eed53c8a4044fed514c8cccf1835177"
6451dependencies = [7366dependencies = [
6452 "byteorder",7367 "byteorder 1.3.4",
6453 "crunchy",7368 "crunchy",
6454 "rustc-hex",7369 "rustc-hex",
6455 "static_assertions",7370 "static_assertions",
6494source = "registry+https://github.com/rust-lang/crates.io-index"7409source = "registry+https://github.com/rust-lang/crates.io-index"
6495checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"7410checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
6496
6497[[package]]
6498name = "unicode-xid"
6499version = "0.0.4"
6500source = "registry+https://github.com/rust-lang/crates.io-index"
6501checksum = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
65027411
6503[[package]]7412[[package]]
6504name = "unicode-xid"7413name = "unicode-xid"
6512source = "registry+https://github.com/rust-lang/crates.io-index"7421source = "registry+https://github.com/rust-lang/crates.io-index"
6513checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402"7422checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402"
6514dependencies = [7423dependencies = [
6515 "generic-array 0.14.3",7424 "generic-array 0.14.4",
6516 "subtle 2.2.3",7425 "subtle 2.3.0",
6517]7426]
65187427
6519[[package]]7428[[package]]
6520name = "unsigned-varint"7429name = "unsigned-varint"
6521version = "0.3.3"7430version = "0.4.0"
6522source = "registry+https://github.com/rust-lang/crates.io-index"7431source = "registry+https://github.com/rust-lang/crates.io-index"
6523checksum = "f67332660eb59a6f1eb24ff1220c9e8d01738a8503c6002e30bcfe4bd9f2b4a9"7432checksum = "669d776983b692a906c881fcd0cfb34271a48e197e4d6cb8df32b05bfc3d3fa5"
6524dependencies = [7433dependencies = [
6525 "bytes 0.5.6",7434 "bytes 0.5.6",
6526 "futures-io",7435 "futures-io",
6527 "futures-util",7436 "futures-util",
6528 "futures_codec 0.3.4",7437 "futures_codec",
6529]7438]
65307439
6531[[package]]7440[[package]]
6532name = "unsigned-varint"7441name = "unsigned-varint"
6533version = "0.4.0"7442version = "0.5.1"
6534source = "registry+https://github.com/rust-lang/crates.io-index"7443source = "registry+https://github.com/rust-lang/crates.io-index"
6535checksum = "669d776983b692a906c881fcd0cfb34271a48e197e4d6cb8df32b05bfc3d3fa5"7444checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35"
6536dependencies = [7445dependencies = [
6537 "bytes 0.5.6",7446 "futures-io",
6538 "futures_codec 0.4.1",7447 "futures-util",
6539]7448]
65407449
6541[[package]]7450[[package]]
6572source = "registry+https://github.com/rust-lang/crates.io-index"7481source = "registry+https://github.com/rust-lang/crates.io-index"
6573checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"7482checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c"
7483
7484[[package]]
7485name = "vec-arena"
7486version = "1.0.0"
7487source = "registry+https://github.com/rust-lang/crates.io-index"
7488checksum = "eafc1b9b2dfc6f5529177b62cf806484db55b32dc7c9658a118e11bbeb33061d"
65747489
6575[[package]]7490[[package]]
6576name = "vec_map"7491name = "vec_map"
6590source = "registry+https://github.com/rust-lang/crates.io-index"7505source = "registry+https://github.com/rust-lang/crates.io-index"
6591checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"7506checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
7507
7508[[package]]
7509name = "waker-fn"
7510version = "1.1.0"
7511source = "registry+https://github.com/rust-lang/crates.io-index"
7512checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
65927513
6593[[package]]7514[[package]]
6594name = "want"7515name = "want"
6595version = "0.2.0"7516version = "0.2.0"
6596source = "registry+https://github.com/rust-lang/crates.io-index"7517source = "registry+https://github.com/rust-lang/crates.io-index"
6597checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230"7518checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230"
6598dependencies = [7519dependencies = [
6599 "futures 0.1.29",7520 "futures 0.1.30",
6600 "log",7521 "log",
6601 "try-lock",7522 "try-lock",
6602]7523]
6617source = "registry+https://github.com/rust-lang/crates.io-index"7538source = "registry+https://github.com/rust-lang/crates.io-index"
6618checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"7539checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
7540
7541[[package]]
7542name = "wasi"
7543version = "0.10.0+wasi-snapshot-preview1"
7544source = "registry+https://github.com/rust-lang/crates.io-index"
7545checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
66197546
6620[[package]]7547[[package]]
6621name = "wasm-bindgen"7548name = "wasm-bindgen"
6622version = "0.2.65"7549version = "0.2.68"
6623source = "registry+https://github.com/rust-lang/crates.io-index"7550source = "registry+https://github.com/rust-lang/crates.io-index"
6624checksum = "f3edbcc9536ab7eababcc6d2374a0b7bfe13a2b6d562c5e07f370456b1a8f33d"7551checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42"
6625dependencies = [7552dependencies = [
6626 "cfg-if",7553 "cfg-if 0.1.10",
6627 "wasm-bindgen-macro",7554 "wasm-bindgen-macro",
6628]7555]
66297556
6630[[package]]7557[[package]]
6631name = "wasm-bindgen-backend"7558name = "wasm-bindgen-backend"
6632version = "0.2.65"7559version = "0.2.68"
6633source = "registry+https://github.com/rust-lang/crates.io-index"7560source = "registry+https://github.com/rust-lang/crates.io-index"
6634checksum = "89ed2fb8c84bfad20ea66b26a3743f3e7ba8735a69fe7d95118c33ec8fc1244d"7561checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68"
6635dependencies = [7562dependencies = [
6636 "bumpalo",7563 "bumpalo",
6637 "lazy_static",7564 "lazy_static",
6638 "log",7565 "log",
6639 "proc-macro2",7566 "proc-macro2",
6640 "quote 1.0.7",7567 "quote",
6641 "syn 1.0.34",7568 "syn",
6642 "wasm-bindgen-shared",7569 "wasm-bindgen-shared",
6643]7570]
66447571
6645[[package]]7572[[package]]
6646name = "wasm-bindgen-futures"7573name = "wasm-bindgen-futures"
6647version = "0.4.15"7574version = "0.4.18"
6648source = "registry+https://github.com/rust-lang/crates.io-index"7575source = "registry+https://github.com/rust-lang/crates.io-index"
6649checksum = "41ad6e4e8b2b7f8c90b6e09a9b590ea15cb0d1dbe28502b5a405cd95d1981671"7576checksum = "b7866cab0aa01de1edf8b5d7936938a7e397ee50ce24119aef3e1eaa3b6171da"
6650dependencies = [7577dependencies = [
6651 "cfg-if",7578 "cfg-if 0.1.10",
6652 "js-sys",7579 "js-sys",
6653 "wasm-bindgen",7580 "wasm-bindgen",
6654 "web-sys",7581 "web-sys",
6655]7582]
66567583
6657[[package]]7584[[package]]
6658name = "wasm-bindgen-macro"7585name = "wasm-bindgen-macro"
6659version = "0.2.65"7586version = "0.2.68"
6660source = "registry+https://github.com/rust-lang/crates.io-index"7587source = "registry+https://github.com/rust-lang/crates.io-index"
6661checksum = "eb071268b031a64d92fc6cf691715ca5a40950694d8f683c5bb43db7c730929e"7588checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038"
6662dependencies = [7589dependencies = [
6663 "quote 1.0.7",7590 "quote",
6664 "wasm-bindgen-macro-support",7591 "wasm-bindgen-macro-support",
6665]7592]
66667593
6667[[package]]7594[[package]]
6668name = "wasm-bindgen-macro-support"7595name = "wasm-bindgen-macro-support"
6669version = "0.2.65"7596version = "0.2.68"
6670source = "registry+https://github.com/rust-lang/crates.io-index"7597source = "registry+https://github.com/rust-lang/crates.io-index"
6671checksum = "cf592c807080719d1ff2f245a687cbadb3ed28b2077ed7084b47aba8b691f2c6"7598checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe"
6672dependencies = [7599dependencies = [
6673 "proc-macro2",7600 "proc-macro2",
6674 "quote 1.0.7",7601 "quote",
6675 "syn 1.0.34",7602 "syn",
6676 "wasm-bindgen-backend",7603 "wasm-bindgen-backend",
6677 "wasm-bindgen-shared",7604 "wasm-bindgen-shared",
6678]7605]
66797606
6680[[package]]7607[[package]]
6681name = "wasm-bindgen-shared"7608name = "wasm-bindgen-shared"
6682version = "0.2.65"7609version = "0.2.68"
6683source = "registry+https://github.com/rust-lang/crates.io-index"7610source = "registry+https://github.com/rust-lang/crates.io-index"
6684checksum = "72b6c0220ded549d63860c78c38f3bcc558d1ca3f4efa74942c536ddbbb55e87"7611checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307"
66857612
6686[[package]]7613[[package]]
6687name = "wasm-timer"7614name = "wasm-timer"
6688version = "0.2.4"7615version = "0.2.5"
6689source = "registry+https://github.com/rust-lang/crates.io-index"7616source = "registry+https://github.com/rust-lang/crates.io-index"
6690checksum = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54"7617checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
6691dependencies = [7618dependencies = [
6692 "futures 0.3.5",7619 "futures 0.3.6",
6693 "js-sys",7620 "js-sys",
6694 "parking_lot 0.9.0",7621 "parking_lot 0.11.0",
6695 "pin-utils",7622 "pin-utils",
6696 "send_wrapper",
6697 "wasm-bindgen",7623 "wasm-bindgen",
6698 "wasm-bindgen-futures",7624 "wasm-bindgen-futures",
6699 "web-sys",7625 "web-sys",
6708 "libc",7634 "libc",
6709 "memory_units",7635 "memory_units",
6710 "num-rational",7636 "num-rational",
6711 "num-traits 0.2.12",7637 "num-traits",
6712 "parity-wasm",7638 "parity-wasm",
6713 "wasmi-validation",7639 "wasmi-validation",
6714]7640]
6722 "parity-wasm",7648 "parity-wasm",
6723]7649]
7650
7651[[package]]
7652name = "wasmparser"
7653version = "0.57.0"
7654source = "registry+https://github.com/rust-lang/crates.io-index"
7655checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6"
7656
7657[[package]]
7658name = "wasmparser"
7659version = "0.59.0"
7660source = "registry+https://github.com/rust-lang/crates.io-index"
7661checksum = "a950e6a618f62147fd514ff445b2a0b53120d382751960797f85f058c7eda9b9"
7662
7663[[package]]
7664name = "wasmtime"
7665version = "0.19.0"
7666source = "registry+https://github.com/rust-lang/crates.io-index"
7667checksum = "1cd3c4f449382779ef6e0a7c3ec6752ae614e20a42e4100000c3efdc973100e2"
7668dependencies = [
7669 "anyhow",
7670 "backtrace",
7671 "cfg-if 0.1.10",
7672 "lazy_static",
7673 "libc",
7674 "log",
7675 "region",
7676 "rustc-demangle",
7677 "smallvec 1.4.2",
7678 "target-lexicon",
7679 "wasmparser 0.59.0",
7680 "wasmtime-environ",
7681 "wasmtime-jit",
7682 "wasmtime-profiling",
7683 "wasmtime-runtime",
7684 "wat",
7685 "winapi 0.3.9",
7686]
7687
7688[[package]]
7689name = "wasmtime-debug"
7690version = "0.19.0"
7691source = "registry+https://github.com/rust-lang/crates.io-index"
7692checksum = "6e634af9067a3af6cf2c7d33dc3b84767ddaf5d010ba68e80eecbcea73d4a349"
7693dependencies = [
7694 "anyhow",
7695 "gimli 0.21.0",
7696 "more-asserts",
7697 "object 0.20.0",
7698 "target-lexicon",
7699 "thiserror",
7700 "wasmparser 0.59.0",
7701 "wasmtime-environ",
7702]
7703
7704[[package]]
7705name = "wasmtime-environ"
7706version = "0.19.0"
7707source = "registry+https://github.com/rust-lang/crates.io-index"
7708checksum = "08f85619a94ee4034bd5bb87fc3dcf71fd2237b81c840809da1201061eec9ab3"
7709dependencies = [
7710 "anyhow",
7711 "base64 0.12.3",
7712 "bincode",
7713 "cfg-if 0.1.10",
7714 "cranelift-codegen",
7715 "cranelift-entity",
7716 "cranelift-frontend",
7717 "cranelift-wasm",
7718 "directories",
7719 "errno",
7720 "file-per-thread-logger",
7721 "indexmap",
7722 "libc",
7723 "log",
7724 "more-asserts",
7725 "rayon",
7726 "serde",
7727 "sha2 0.8.2",
7728 "thiserror",
7729 "toml",
7730 "wasmparser 0.59.0",
7731 "winapi 0.3.9",
7732 "zstd",
7733]
7734
7735[[package]]
7736name = "wasmtime-jit"
7737version = "0.19.0"
7738source = "registry+https://github.com/rust-lang/crates.io-index"
7739checksum = "e914c013c7a9f15f4e429d5431f2830fb8adb56e40567661b69c5ec1d645be23"
7740dependencies = [
7741 "anyhow",
7742 "cfg-if 0.1.10",
7743 "cranelift-codegen",
7744 "cranelift-entity",
7745 "cranelift-frontend",
7746 "cranelift-native",
7747 "cranelift-wasm",
7748 "gimli 0.21.0",
7749 "log",
7750 "more-asserts",
7751 "object 0.20.0",
7752 "region",
7753 "target-lexicon",
7754 "thiserror",
7755 "wasmparser 0.59.0",
7756 "wasmtime-debug",
7757 "wasmtime-environ",
7758 "wasmtime-obj",
7759 "wasmtime-profiling",
7760 "wasmtime-runtime",
7761 "winapi 0.3.9",
7762]
7763
7764[[package]]
7765name = "wasmtime-obj"
7766version = "0.19.0"
7767source = "registry+https://github.com/rust-lang/crates.io-index"
7768checksum = "e81d8e02e9bc9fe2da9b6d48bbc217f96e089f7df613f11a28a3958abc44641e"
7769dependencies = [
7770 "anyhow",
7771 "more-asserts",
7772 "object 0.20.0",
7773 "target-lexicon",
7774 "wasmtime-debug",
7775 "wasmtime-environ",
7776]
7777
7778[[package]]
7779name = "wasmtime-profiling"
7780version = "0.19.0"
7781source = "registry+https://github.com/rust-lang/crates.io-index"
7782checksum = "1e8d4d1af8dd5f7096cfcc89dd668d358e52980c38cce199643372ffd6590e27"
7783dependencies = [
7784 "anyhow",
7785 "cfg-if 0.1.10",
7786 "gimli 0.21.0",
7787 "lazy_static",
7788 "libc",
7789 "object 0.19.0",
7790 "scroll",
7791 "serde",
7792 "target-lexicon",
7793 "wasmtime-environ",
7794 "wasmtime-runtime",
7795]
7796
7797[[package]]
7798name = "wasmtime-runtime"
7799version = "0.19.0"
7800source = "registry+https://github.com/rust-lang/crates.io-index"
7801checksum = "3a25f140bbbaadb07c531cba99ce1a966dba216138dc1b2a0ddecec851a01a93"
7802dependencies = [
7803 "backtrace",
7804 "cc",
7805 "cfg-if 0.1.10",
7806 "indexmap",
7807 "lazy_static",
7808 "libc",
7809 "log",
7810 "memoffset",
7811 "more-asserts",
7812 "region",
7813 "thiserror",
7814 "wasmtime-environ",
7815 "winapi 0.3.9",
7816]
7817
7818[[package]]
7819name = "wast"
7820version = "26.0.0"
7821source = "registry+https://github.com/rust-lang/crates.io-index"
7822checksum = "d54b3678343bfdf1768c16308a4b53823b70f7bb148d3d38225123d4306ec731"
7823dependencies = [
7824 "leb128",
7825]
7826
7827[[package]]
7828name = "wat"
7829version = "1.0.27"
7830source = "registry+https://github.com/rust-lang/crates.io-index"
7831checksum = "26b2dccbce4d0e14875091846e110a2369267b18ddd0d6423479b88dad914d71"
7832dependencies = [
7833 "wast",
7834]
67247835
6725[[package]]7836[[package]]
6726name = "web-sys"7837name = "web-sys"
6727version = "0.3.42"7838version = "0.3.45"
6728source = "registry+https://github.com/rust-lang/crates.io-index"7839source = "registry+https://github.com/rust-lang/crates.io-index"
6729checksum = "8be2398f326b7ba09815d0b403095f34dd708579220d099caae89be0b32137b2"7840checksum = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d"
6730dependencies = [7841dependencies = [
6731 "js-sys",7842 "js-sys",
6732 "wasm-bindgen",7843 "wasm-bindgen",
6760 "webpki",7871 "webpki",
6761]7872]
7873
7874[[package]]
7875name = "wepoll-sys"
7876version = "3.0.0"
7877source = "registry+https://github.com/rust-lang/crates.io-index"
7878checksum = "142bc2cba3fe88be1a8fcb55c727fa4cd5b0cf2d7438722792e22f26f04bc1e0"
7879dependencies = [
7880 "cc",
7881]
67627882
6763[[package]]7883[[package]]
6764name = "which"7884name = "which"
6812source = "registry+https://github.com/rust-lang/crates.io-index"7932source = "registry+https://github.com/rust-lang/crates.io-index"
6813checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"7933checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
6814
6815[[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]
68327934
6833[[package]]7935[[package]]
6834name = "ws2_32-sys"7936name = "ws2_32-sys"
6846source = "registry+https://github.com/rust-lang/crates.io-index"7948source = "registry+https://github.com/rust-lang/crates.io-index"
6847checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217"7949checksum = "637ff90c9540fa3073bb577e65033069e4bae7c79d49d74aa3ffdf5342a53217"
6848dependencies = [7950dependencies = [
6849 "curve25519-dalek",7951 "curve25519-dalek 2.1.0",
6850 "rand_core 0.5.1",7952 "rand_core 0.5.1",
6851 "zeroize",7953 "zeroize",
6852]7954]
7955
7956[[package]]
7957name = "x25519-dalek"
7958version = "1.1.0"
7959source = "registry+https://github.com/rust-lang/crates.io-index"
7960checksum = "bc614d95359fd7afc321b66d2107ede58b246b844cf5d8a0adcca413e439f088"
7961dependencies = [
7962 "curve25519-dalek 3.0.0",
7963 "rand_core 0.5.1",
7964 "zeroize",
7965]
68537966
6854[[package]]7967[[package]]
6855name = "yamux"7968name = "yamux"
6856version = "0.4.7"7969version = "0.8.0"
6857source = "registry+https://github.com/rust-lang/crates.io-index"7970source = "registry+https://github.com/rust-lang/crates.io-index"
6858checksum = "cd37e58a1256a0b328ce9c67d8b62ecdd02f4803ba443df478835cb1a41a637c"7971checksum = "9aeb8c4043cac71c3c299dff107171c220d179492350ea198e109a414981b83c"
6859dependencies = [7972dependencies = [
6860 "futures 0.3.5",7973 "futures 0.3.6",
6861 "log",7974 "log",
6862 "nohash-hasher",7975 "nohash-hasher",
6863 "parking_lot 0.10.2",7976 "parking_lot 0.11.0",
6864 "rand 0.7.3",7977 "rand 0.7.3",
6865 "static_assertions",7978 "static_assertions",
6866]7979]
68677980
6868[[package]]7981[[package]]
6869name = "zeroize"7982name = "zeroize"
6870version = "1.1.0"7983version = "1.1.1"
6871source = "registry+https://github.com/rust-lang/crates.io-index"7984source = "registry+https://github.com/rust-lang/crates.io-index"
6872checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8"7985checksum = "05f33972566adbd2d3588b0491eb94b98b43695c4ef897903470ede4f3f5a28a"
6873dependencies = [7986dependencies = [
6874 "zeroize_derive",7987 "zeroize_derive",
6875]7988]
68767989
6877[[package]]7990[[package]]
6878name = "zeroize_derive"7991name = "zeroize_derive"
6879version = "1.0.0"7992version = "1.0.1"
6880source = "registry+https://github.com/rust-lang/crates.io-index"7993source = "registry+https://github.com/rust-lang/crates.io-index"
6881checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2"7994checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16"
6882dependencies = [7995dependencies = [
6883 "proc-macro2",7996 "proc-macro2",
6884 "quote 1.0.7",7997 "quote",
6885 "syn 1.0.34",7998 "syn",
6886 "synstructure",7999 "synstructure",
6887]8000]
8001
8002[[package]]
8003name = "zstd"
8004version = "0.5.3+zstd.1.4.5"
8005source = "registry+https://github.com/rust-lang/crates.io-index"
8006checksum = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8"
8007dependencies = [
8008 "zstd-safe",
8009]
8010
8011[[package]]
8012name = "zstd-safe"
8013version = "2.0.5+zstd.1.4.5"
8014source = "registry+https://github.com/rust-lang/crates.io-index"
8015checksum = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055"
8016dependencies = [
8017 "libc",
8018 "zstd-sys",
8019]
8020
8021[[package]]
8022name = "zstd-sys"
8023version = "1.4.17+zstd.1.4.5"
8024source = "registry+https://github.com/rust-lang/crates.io-index"
8025checksum = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b"
8026dependencies = [
8027 "cc",
8028 "glob",
8029 "itertools 0.9.0",
8030 "libc",
8031]
68888032
modifiedDockerfilediffbeforeafterboth
3FROM phusion/baseimage:0.10.2 as builder3FROM phusion/baseimage:0.10.2 as builder
4LABEL maintainer="gz@usetech.com"4LABEL maintainer="gz@usetech.com"
55
6ENV WASM_TOOLCHAIN=nightly-2020-05-016ENV WASM_TOOLCHAIN=nightly-2020-10-01
77
8ARG PROFILE=release8ARG PROFILE=release
99
17WORKDIR /nft_parachain17WORKDIR /nft_parachain
18COPY . .18COPY . .
1919
20RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \20RUN export CARGO_HOME="/cargo-home" && curl https://sh.rustup.rs -sSf | sh -s -- -y
21RUN export PATH="/cargo-home/bin:$PATH" && \
22 export CARGO_HOME="/cargo-home" && \
21 export PATH="$PATH:$HOME/.cargo/bin" && \23 cargo fetch
24RUN export PATH="/cargo-home/bin:$PATH" && \
25 export CARGO_HOME="/cargo-home" && \
22 rustup toolchain uninstall $(rustup toolchain list) && \26 rustup toolchain uninstall $(rustup toolchain list) && \
23 rustup default 1.44.0 && \
24 rustup toolchain install $WASM_TOOLCHAIN && \27 rustup toolchain install $WASM_TOOLCHAIN && \
25 rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \28 rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \
26 rustup target list --installed && \29 rustup target list --installed && \
27 rustup show && \30 rustup show
31
32RUN export PATH="/cargo-home/bin:$PATH" && \
33 export CARGO_HOME="/cargo-home" && \
28 cargo build "--$PROFILE" 34 cargo +$WASM_TOOLCHAIN build "--$PROFILE"
29 # && \35 # && \
30 # cargo test36 # cargo test
31
32RUN cd target/release && ls -la
3337
34# ===== RUN ======38# ===== RUN ======
3539
modifiedREADME.mddiffbeforeafterboth
115115
116Additional CLI usage options are available and may be shown by running `cargo run -- --help`.116Additional CLI usage options are available and may be shown by running `cargo run -- --help`.
117117
118## Benchmarks
118119
120First of all, add rust toolchain and make it default.
121```bash
122rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-01
123```
124
125Then in "/node/src" run build command below
126```bash
127cargo +nightly-2020-10-01 build --release --features runtime-benchmarks
128```
129
130Run benchmark
131```bash
132target/release/nft benchmark --chain dev --pallet "pallet_nft" --extrinsic "*" --repeat 1
133```
134
119## UI custom types135## UI custom types
120```136```
121{137{
151 "CollectionMode": {167 "CollectionMode": {
152 "_enum": {168 "_enum": {
153 "Invalid": null,169 "Invalid": null,
154 "NFT": "u32",170 "NFT": null,
155 "Fungible": "u32",171 "Fungible": "u32",
156 "ReFungible": "(u32, u32)"172 "ReFungible": "u32"
157 }173 }
158 },174 },
159 "Ownership": {175 "Ownership": {
173 "NftItemType": {189 "NftItemType": {
174 "Collection": "u64",190 "Collection": "u64",
175 "Owner": "AccountId",191 "Owner": "AccountId",
176 "Data": "Vec<u8>"192 "ConstData": "Vec<u8>",
193 "VariableData": "Vec<u8>"
177 },194 },
178 "Ownership": {195 "Ownership": {
179 "owner": "AccountId",196 "owner": "AccountId",
182 "ReFungibleItemType": {199 "ReFungibleItemType": {
183 "Collection": "u64",200 "Collection": "u64",
184 "Owner": "Vec<Ownership<AccountId>>",201 "Owner": "Vec<Ownership<AccountId>>",
185 "Data": "Vec<u8>"202 "ConstData": "Vec<u8>",
203 "VariableData": "Vec<u8>"
186 },204 },
187 "CollectionType": {205 "CollectionType": {
188 "Owner": "AccountId",206 "Owner": "AccountId",
192 "Name": "Vec<u16>",210 "Name": "Vec<u16>",
193 "Description": "Vec<u16>",211 "Description": "Vec<u16>",
194 "TokenPrefix": "Vec<u8>",212 "TokenPrefix": "Vec<u8>",
195 "CustomDataSize": "u32",
196 "MintMode": "bool",213 "MintMode": "bool",
197 "OffchainSchema": "Vec<u8>",214 "OffchainSchema": "Vec<u8>",
198 "Sponsor": "AccountId",215 "Sponsor": "AccountId",
199 "UnconfirmedSponsor": "AccountId"216 "UnconfirmedSponsor": "AccountId",
217 "VariableOnChainSchema": "Vec<u8>",
218 "ConstOnChainSchema": "Vec<u8>"
200 },219 },
201 "ApprovePermissions": {220 "ApprovePermissions": {
202 "Approved": "AccountId",221 "Approved": "AccountId",
205 "RawData": "Vec<u8>",224 "RawData": "Vec<u8>",
206 "Address": "AccountId",225 "Address": "AccountId",
207 "LookupSource": "AccountId",226 "LookupSource": "AccountId",
208 "Weight": "u64"227 "Weight": "u64",
228 "CreateNftData": {
229 "const_data": "Vec<u8>",
230 "variable_data": "Vec<u8>"
231 },
232 "CreateFungibleData": {},
233 "CreateReFungibleData": {
234 "const_data": "Vec<u8>",
235 "variable_data": "Vec<u8>"
236 },
237 "CreateItemData": {
238 "_enum": {
239 "NFT": "CreateNftData",
240 "Fungible": "CreateFungibleData",
241 "ReFungible": "CreateReFungibleData"
242 }
243 }
209}244}
210245
211```246```
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 = 'v2.0.0_release'
4version = '2.0.0-rc4'4version = '2.0.0'
55
6[[bin]]6[[bin]]
7name = 'nft'7name = 'nft'
15license = 'Unlicense'15license = 'Unlicense'
16name = 'nft'16name = 'nft'
17repository = 'https://github.com/substrate-developer-hub/nft/'17repository = 'https://github.com/substrate-developer-hub/nft/'
18version = '2.0.0-rc4'18version = '2.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']
25log = '0.4.8'25log = '0.4.8'
26parking_lot = '0.10.0'26parking_lot = '0.10.0'
27structopt = '0.3.8'27structopt = '0.3.8'
28jsonrpc-core = '14.0.5'28jsonrpc-core = '15.0.0'
2929
30# Substrate dependencies
30[dependencies.nft-runtime]31nft-runtime = { path = '../runtime', version = '2.0.0' }
31path = '../runtime'
32version = '2.0.0-rc4'
33
34[dependencies.sc-basic-authorship]
35git = 'https://github.com/usetech-llc/substrate.git'32frame-benchmarking = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
36branch = 'rc4_ext_dispatch_reenabled'
37version = '0.8.0-rc4'33frame-benchmarking-cli = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
38
39[dependencies.sc-cli]
40git = 'https://github.com/usetech-llc/substrate.git'
41branch = 'rc4_ext_dispatch_reenabled'
42version = '0.8.0-rc4'34pallet-transaction-payment-rpc = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
43
44[dependencies.sc-client-api]
45git = 'https://github.com/usetech-llc/substrate.git'
46branch = 'rc4_ext_dispatch_reenabled'
47version = '2.0.0-rc4'35sc-basic-authorship = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
48
49[dependencies.sc-consensus]
50git = 'https://github.com/usetech-llc/substrate.git'
51branch = 'rc4_ext_dispatch_reenabled'
52version = '0.8.0-rc4'36sc-cli = { features = ['wasmtime'], version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
53
54[dependencies.pallet-contracts-rpc]
55git = 'https://github.com/usetech-llc/substrate.git'
56version = '0.8.0-rc4'37sc-client-api = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
57branch = 'rc4_ext_dispatch_reenabled'
58
59[dependencies.sc-rpc]
60git = 'https://github.com/usetech-llc/substrate.git'38sc-consensus = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
61branch = 'rc4_ext_dispatch_reenabled'
62
63[dependencies.sc-consensus-aura]39sc-consensus-aura = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
64git = 'https://github.com/usetech-llc/substrate.git'
65branch = 'rc4_ext_dispatch_reenabled'
66version = '0.8.0-rc4'40sc-executor = { features = ['wasmtime'], version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
67
68[dependencies.sc-executor]
69git = 'https://github.com/usetech-llc/substrate.git'
70branch = 'rc4_ext_dispatch_reenabled'
71version = '0.8.0-rc4'41sc-finality-grandpa = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
72
73[dependencies.sc-finality-grandpa]
74git = 'https://github.com/usetech-llc/substrate.git'
75branch = 'rc4_ext_dispatch_reenabled'
76version = '0.8.0-rc4'42sc-rpc = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
77
78[dependencies.sc-network]
79git = 'https://github.com/usetech-llc/substrate.git'
80branch = 'rc4_ext_dispatch_reenabled'
81version = '0.8.0-rc4'43sc-rpc-api = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
82
83[dependencies.sc-service]
84git = 'https://github.com/usetech-llc/substrate.git'
85branch = 'rc4_ext_dispatch_reenabled'
86version = '0.8.0-rc4'44sc-service = { features = ['wasmtime'], version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
87
88[dependencies.sc-transaction-pool]45sc-transaction-pool = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
89git = 'https://github.com/usetech-llc/substrate.git'46sp-api = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
90branch = 'rc4_ext_dispatch_reenabled'
91version = '2.0.0-rc4'47sp-block-builder = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
92
93[dependencies.sp-consensus]
94git = 'https://github.com/usetech-llc/substrate.git'48sp-blockchain = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
95branch = 'rc4_ext_dispatch_reenabled'
96version = '0.8.0-rc4'49sp-consensus = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
97
98[dependencies.sp-consensus-aura]
99git = 'https://github.com/usetech-llc/substrate.git'
100branch = 'rc4_ext_dispatch_reenabled'
101version = '0.8.0-rc4'50sp-consensus-aura = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
102
103[dependencies.sp-core]51sp-core = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
104git = 'https://github.com/usetech-llc/substrate.git'
105branch = 'rc4_ext_dispatch_reenabled'
106version = '2.0.0-rc4'52sp-finality-grandpa = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
107
108[dependencies.sp-finality-grandpa]
109git = 'https://github.com/usetech-llc/substrate.git'
110branch = 'rc4_ext_dispatch_reenabled'
111version = '2.0.0-rc4'53sp-inherents = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
112
113[dependencies.sp-inherents]
114git = 'https://github.com/usetech-llc/substrate.git'54sp-runtime = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
115branch = 'rc4_ext_dispatch_reenabled'
116version = '2.0.0-rc4'55sp-transaction-pool = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
117
118[dependencies.sp-runtime]
119git = 'https://github.com/usetech-llc/substrate.git'56sc-network = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
120branch = 'rc4_ext_dispatch_reenabled'
121version = '2.0.0-rc4'57substrate-frame-rpc-system = {version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
122
123[dependencies.sp-transaction-pool]
124git = 'https://github.com/usetech-llc/substrate.git'
125branch = 'rc4_ext_dispatch_reenabled'
126version = '2.0.0-rc4'58pallet-contracts-rpc = {version = '0.8.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release'}
59
60[features]
61default = []
62runtime-benchmarks = ['nft-runtime/runtime-benchmarks']
12763
modifiednode/src/chain_spec.rsdiffbeforeafterboth
38 (get_from_seed::<AuraId>(s), get_from_seed::<GrandpaId>(s))38 (get_from_seed::<AuraId>(s), get_from_seed::<GrandpaId>(s))
39}39}
4040
41pub fn development_config() -> ChainSpec {41pub fn development_config() -> Result<ChainSpec, String> {
42 let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;
43
42 ChainSpec::from_genesis(44 Ok(ChainSpec::from_genesis(
45 // Name
43 "Development",46 "Development",
47 // ID
44 "dev",48 "dev",
45 ChainType::Development,49 ChainType::Development,
46 || {50 move || testnet_genesis(
47 testnet_genesis(51 wasm_binary,
52 // Initial PoA authorities
48 vec![authority_keys_from_seed("Alice")],53 vec![
54 authority_keys_from_seed("Alice"),
55 ],
56 // Sudo account
49 get_account_id_from_seed::<sr25519::Public>("Alice"),57 get_account_id_from_seed::<sr25519::Public>("Alice"),
58 // Pre-funded accounts
50 vec![59 vec![
51 get_account_id_from_seed::<sr25519::Public>("Alice"),60 get_account_id_from_seed::<sr25519::Public>("Alice"),
52 get_account_id_from_seed::<sr25519::Public>("Bob"),61 get_account_id_from_seed::<sr25519::Public>("Bob"),
55 ],64 ],
56 true,65 true,
57 )66 ),
58 },67 // Bootnodes
59 vec![],68 vec![],
69 // Telemetry
60 None,70 None,
71 // Protocol ID
61 None,72 None,
73 // Properties
62 None,74 None,
75 // Extensions
63 None,76 None,
64 )77 ))
65}78}
6679
67pub fn local_testnet_config() -> ChainSpec {80pub fn local_testnet_config() -> Result<ChainSpec, String> {
81 let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;
82
68 ChainSpec::from_genesis(83 Ok(ChainSpec::from_genesis(
84 // Name
69 "Local Testnet",85 "Local Testnet",
86 // ID
70 "local_testnet",87 "local_testnet",
71 ChainType::Local,88 ChainType::Local,
72 || {89 move || testnet_genesis(
73 testnet_genesis(90 wasm_binary,
91 // Initial PoA authorities
74 vec![92 vec![
75 authority_keys_from_seed("Alice"),93 authority_keys_from_seed("Alice"),
76 authority_keys_from_seed("Bob"),94 authority_keys_from_seed("Bob"),
77 ],95 ],
96 // Sudo account
78 get_account_id_from_seed::<sr25519::Public>("Alice"),97 get_account_id_from_seed::<sr25519::Public>("Alice"),
98 // Pre-funded accounts
79 vec![99 vec![
80 get_account_id_from_seed::<sr25519::Public>("Alice"),100 get_account_id_from_seed::<sr25519::Public>("Alice"),
81 get_account_id_from_seed::<sr25519::Public>("Bob"),101 get_account_id_from_seed::<sr25519::Public>("Bob"),
92 ],112 ],
93 true,113 true,
94 )114 ),
95 },115 // Bootnodes
96 vec![],116 vec![],
117 // Telemetry
97 None,118 None,
119 // Protocol ID
98 None,120 None,
121 // Properties
99 None,122 None,
123 // Extensions
100 None,124 None,
101 )125 ))
102}126}
103127
104fn testnet_genesis(128fn testnet_genesis(
129 wasm_binary: &[u8],
105 initial_authorities: Vec<(AuraId, GrandpaId)>,130 initial_authorities: Vec<(AuraId, GrandpaId)>,
106 root_key: AccountId,131 root_key: AccountId,
107 endowed_accounts: Vec<AccountId>,132 endowed_accounts: Vec<AccountId>,
108 enable_println: bool,133 enable_println: bool,
109) -> GenesisConfig {134) -> GenesisConfig {
110 GenesisConfig {135 GenesisConfig {
111 system: Some(SystemConfig {136 system: Some(SystemConfig {
112 code: WASM_BINARY.to_vec(),137 code: wasm_binary.to_vec(),
113 changes_trie_config: Default::default(),138 changes_trie_config: Default::default(),
114 }),139 }),
115 balances: Some(BalancesConfig {140 pallet_balances: Some(BalancesConfig {
116 balances: endowed_accounts141 balances: endowed_accounts
117 .iter()142 .iter()
118 .cloned()143 .cloned()
119 .map(|k| (k, 1 << 100))144 .map(|k| (k, 1 << 100))
120 .collect(),145 .collect(),
121 }),146 }),
122 aura: Some(AuraConfig {147 pallet_aura: Some(AuraConfig {
123 authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),148 authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),
124 }),149 }),
125 grandpa: Some(GrandpaConfig {150 pallet_grandpa: Some(GrandpaConfig {
126 authorities: initial_authorities151 authorities: initial_authorities
127 .iter()152 .iter()
128 .map(|x| (x.1.clone(), 1))153 .map(|x| (x.1.clone(), 1))
129 .collect(),154 .collect(),
130 }),155 }),
131 sudo: Some(SudoConfig { key: root_key }),156 pallet_sudo: Some(SudoConfig { key: root_key }),
132 nft: Some(NftConfig {157 pallet_nft: Some(NftConfig {
133 collection: vec![(158 collection: vec![(
134 1,159 1,
135 CollectionType {160 CollectionType {
136 owner: get_account_id_from_seed::<sr25519::Public>("Alice"),161 owner: get_account_id_from_seed::<sr25519::Public>("Alice"),
137 mode: CollectionMode::NFT(50),162 mode: CollectionMode::NFT,
138 access: AccessMode::Normal,163 access: AccessMode::Normal,
139 decimal_points: 0,164 decimal_points: 0,
140 name: vec![],165 name: vec![],
141 description: vec![],166 description: vec![],
142 token_prefix: vec![],167 token_prefix: vec![],
143 custom_data_size: 50,
144 mint_mode: false,168 mint_mode: false,
145 offchain_schema: vec![],169 offchain_schema: vec![],
146 sponsor: get_account_id_from_seed::<sr25519::Public>("Alice"),170 sponsor: get_account_id_from_seed::<sr25519::Public>("Alice"),
147 unconfirmed_sponsor: get_account_id_from_seed::<sr25519::Public>("Alice"),171 unconfirmed_sponsor: get_account_id_from_seed::<sr25519::Public>("Alice"),
172 const_on_chain_schema: vec![],
173 variable_on_chain_schema: vec![]
148 },174 },
149 )],175 )],
150 nft_item_id: vec![],176 nft_item_id: vec![],
160 refungible_sponsor_transfer_timeout: 15,186 refungible_sponsor_transfer_timeout: 15,
161 },187 },
162 }),188 }),
163 contracts: Some(ContractsConfig {189 pallet_contracts: Some(ContractsConfig {
164 current_schedule: ContractsSchedule {190 current_schedule: ContractsSchedule {
165 enable_println,191 enable_println,
166 ..Default::default()192 ..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 /// Build a chain specification.
16 BuildSpec(sc_cli::BuildSpecCmd),
17
18 /// Validate blocks.
19 CheckBlock(sc_cli::CheckBlockCmd),
20
21 /// Export blocks.
22 ExportBlocks(sc_cli::ExportBlocksCmd),
23
24 /// Export the state of a given block into a chain spec.
25 ExportState(sc_cli::ExportStateCmd),
26
27 /// Import blocks.
28 ImportBlocks(sc_cli::ImportBlocksCmd),
29
30 /// Remove the whole chain.
31 PurgeChain(sc_cli::PurgeChainCmd),
32
33 /// Revert the chain to a previous state.
34 Revert(sc_cli::RevertCmd),
35
36 // The custom benchmark subcommmand benchmarking runtime pallets.
37 #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
38 Benchmark(frame_benchmarking_cli::BenchmarkCmd),
39}
1240
modifiednode/src/command.rsdiffbeforeafterboth
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 "Substrate 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::BuildSpec(cmd)) => {
70 let runner = cli.create_runner(cmd)?;
71 runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
72 },
73 Some(Subcommand::CheckBlock(cmd)) => {
74 let runner = cli.create_runner(cmd)?;
75 runner.async_run(|config| {
76 let PartialComponents { client, task_manager, import_queue, ..}
77 = service::new_partial(&config)?;
78 Ok((cmd.run(client, import_queue), task_manager))
79 })
80 },
81 Some(Subcommand::ExportBlocks(cmd)) => {
82 let runner = cli.create_runner(cmd)?;
83 runner.async_run(|config| {
84 let PartialComponents { client, task_manager, ..}
85 = service::new_partial(&config)?;
86 Ok((cmd.run(client, config.database), task_manager))
87 })
88 },
68 Some(subcommand) => {89 Some(Subcommand::ExportState(cmd)) => {
69 let runner = cli.create_runner(subcommand)?;90 let runner = cli.create_runner(cmd)?;
70 runner.run_subcommand(subcommand, |config| Ok(new_full_start!(config).0))91 runner.async_run(|config| {
92 let PartialComponents { client, task_manager, ..}
93 = service::new_partial(&config)?;
94 Ok((cmd.run(client, config.chain_spec), task_manager))
95 })
71 }96 },
97 Some(Subcommand::ImportBlocks(cmd)) => {
98 let runner = cli.create_runner(cmd)?;
99 runner.async_run(|config| {
100 let PartialComponents { client, task_manager, import_queue, ..}
101 = service::new_partial(&config)?;
102 Ok((cmd.run(client, import_queue), task_manager))
103 })
104 },
105 Some(Subcommand::PurgeChain(cmd)) => {
106 let runner = cli.create_runner(cmd)?;
107 runner.sync_run(|config| cmd.run(config.database))
108 },
109 Some(Subcommand::Revert(cmd)) => {
110 let runner = cli.create_runner(cmd)?;
111 runner.async_run(|config| {
112 let PartialComponents { client, task_manager, backend, ..}
113 = service::new_partial(&config)?;
114 Ok((cmd.run(client, backend), task_manager))
115 })
116 },
117 Some(Subcommand::Benchmark(cmd)) => {
118 if cfg!(feature = "runtime-benchmarks") {
119 let runner = cli.create_runner(cmd)?;
120
121 runner.sync_run(|config| cmd.run::<Block, service::Executor>(config))
122 } else {
123 Err("Benchmarking wasn't enabled when building the node. \
124 You can enable it with `--features runtime-benchmarks`.".into())
125 }
126 },
72 None => {127 None => {
73 let runner = cli.create_runner(&cli.run)?;128 let runner = cli.create_runner(&cli.run)?;
74 runner.run_node(service::new_light, service::new_full, nft_runtime::VERSION)129 runner.run_node_until_exit(|config| match config.role {
130 Role::Light => service::new_light(config),
131 _ => service::new_full(config),
132 })
75 }133 }
76 }134 }
77}135}
addednode/src/lib.rsdiffbeforeafterboth

no changes

modifiednode/src/main.rsdiffbeforeafterboth
6mod service;6mod service;
7mod cli;7mod cli;
8mod command;8mod command;
9mod rpc;
910
10fn main() -> sc_cli::Result<()> {11fn main() -> sc_cli::Result<()> {
11 command::run()12 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
3use std::sync::Arc;
4use std::time::Duration;
5use sc_client_api::{ExecutorProvider, RemoteBackend};
3use nft_runtime::{self, opaque::Block, RuntimeApi};6use nft_runtime::{self, opaque::Block, RuntimeApi};
4use sc_client_api::ExecutorProvider;7use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
5use sc_consensus::LongestChain;8use sp_inherents::InherentDataProviders;
6use sc_executor::native_executor_instance;9use sc_executor::native_executor_instance;
7pub use sc_executor::NativeExecutor;10pub use sc_executor::NativeExecutor;
8use sc_finality_grandpa::{
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;11use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
14use sp_inherents::InherentDataProviders;12use sc_finality_grandpa::{FinalityProofProvider as GrandpaFinalityProofProvider, SharedVoterState};
15use std::sync::Arc;
16use std::time::Duration;
1713
18// Our native executor instance.14// Our native executor instance.
19native_executor_instance!(15native_executor_instance!(
20 pub Executor,16 pub Executor,
21 nft_runtime::api::dispatch,17 nft_runtime::api::dispatch,
22 nft_runtime::native_version,18 nft_runtime::native_version,
19 frame_benchmarking::benchmarking::HostFunctions,
23);20);
2421
25/// Starts a `ServiceBuilder` for a full service.22type FullClient = sc_service::TFullClient<Block, RuntimeApi, Executor>;
26///23type FullBackend = sc_service::TFullBackend<Block>;
27/// Use this macro if you don't actually need the full service, but just the builder in order to24type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;
28/// be able to perform chain operations.25
29macro_rules! new_full_start {
30 ($config:expr) => {{26pub fn new_partial(config: &Configuration) -> Result<sc_service::PartialComponents<
31 use jsonrpc_core::IoHandler;27 FullClient, FullBackend, FullSelectChain,
32 use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;28 sp_consensus::DefaultImportQueue<Block, FullClient>,
29 sc_transaction_pool::FullPool<Block, FullClient>,
30 (
31 sc_consensus_aura::AuraBlockImport<
32 Block,
33 FullClient,
34 sc_finality_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,
35 AuraPair
36 >,
33 use std::sync::Arc;37 sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>
3438 )
35 let mut import_setup = None;39>, ServiceError> {
36 let inherent_data_providers = sp_inherents::InherentDataProviders::new();40 let inherent_data_providers = sp_inherents::InherentDataProviders::new();
3741
38 let builder = sc_service::ServiceBuilder::new_full::<42 let (client, backend, keystore, task_manager) =
39 nft_runtime::opaque::Block,43 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 let client = Arc::new(client);
44 .with_transaction_pool(|builder| {45
45 let pool_api = sc_transaction_pool::FullChainApi::new(builder.client().clone());46 let select_chain = sc_consensus::LongestChain::new(backend.clone());
47
46 Ok(sc_transaction_pool::BasicPool::new(48 let transaction_pool = sc_transaction_pool::BasicPool::new_full(
47 builder.config().transaction_pool.clone(),49 config.transaction_pool.clone(),
48 std::sync::Arc::new(pool_api),
49 builder.prometheus_registry(),50 config.prometheus_registry(),
50 ))
51 })?
52 .with_import_queue(51 task_manager.spawn_handle(),
53 |_config, client, mut select_chain, _transaction_pool, spawn_task_handle, registry| {52 client.clone(),
54 let select_chain = select_chain
55 .take()
56 .ok_or_else(|| sc_service::Error::SelectChainRequired)?;53 );
5754
58 let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import(55 let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import(
59 client.clone(),56 client.clone(), &(client.clone() as Arc<_>), select_chain.clone(),
60 &(client.clone() as Arc<_>),
61 select_chain,
62 )?;57 )?;
6358
64 let aura_block_import =59 let aura_block_import = sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
65 sc_consensus_aura::AuraBlockImport::<_, _, _, AuraPair>::new(
66 grandpa_block_import.clone(),60 grandpa_block_import.clone(), client.clone(),
67 client.clone(),
68 );61 );
6962
70 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(63 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
71 sc_consensus_aura::slot_duration(&*client)?,64 sc_consensus_aura::slot_duration(&*client)?,
72 aura_block_import,65 aura_block_import.clone(),
73 Some(Box::new(grandpa_block_import.clone())),66 Some(Box::new(grandpa_block_import.clone())),
74 None,67 None,
75 client,68 client.clone(),
76 inherent_data_providers.clone(),69 inherent_data_providers.clone(),
77 spawn_task_handle,
78 registry,
79 )?;
80
81 import_setup = Some((grandpa_block_import, grandpa_link));70 &task_manager.spawn_handle(),
82
83 Ok(import_queue)
84 },
85 )?
86 .with_rpc_extensions(|builder| -> Result<IoHandler<sc_rpc::Metadata>, _> {71 config.prometheus_registry(),
87 let handler = pallet_contracts_rpc::Contracts::new(builder.client().clone());72 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
88 let delegate = pallet_contracts_rpc::ContractsApi::to_delegate(handler);
89
90 let mut io = IoHandler::default();
91 io.extend_with(delegate);
92 Ok(io)
93 })?;73 )?;
9474
95 (builder, import_setup, inherent_data_providers)75 Ok(sc_service::PartialComponents {
96 }};76 client, backend, task_manager, import_queue, keystore, select_chain, transaction_pool,
97}77 inherent_data_providers,
78 other: (aura_block_import, grandpa_link),
79 })
80}
9881
99/// Builds a new service for a full client.82/// Builds a new service for a full client.
100pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceError> {83pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
84 let sc_service::PartialComponents {
85 client, backend, mut task_manager, import_queue, keystore, select_chain, transaction_pool,
86 inherent_data_providers,
87 other: (block_import, grandpa_link),
88 } = new_partial(&config)?;
89
90 let finality_proof_provider =
91 GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
92
93 let (network, network_status_sinks, system_rpc_tx, network_starter) =
94 sc_service::build_network(sc_service::BuildNetworkParams {
95 config: &config,
96 client: client.clone(),
97 transaction_pool: transaction_pool.clone(),
98 spawn_handle: task_manager.spawn_handle(),
99 import_queue,
100 on_demand: None,
101 block_announce_validator_builder: None,
102 finality_proof_request_builder: None,
103 finality_proof_provider: Some(finality_proof_provider.clone()),
104 })?;
105
106 if config.offchain_worker.enabled {
107 sc_service::build_offchain_workers(
108 &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(),
109 );
110 }
111
101 let role = config.role.clone();112 let role = config.role.clone();
102 let force_authoring = config.force_authoring;113 let force_authoring = config.force_authoring;
103 let name = config.network.node_name.clone();114 let name = config.network.node_name.clone();
104 let disable_grandpa = config.disable_grandpa;115 let enable_grandpa = !config.disable_grandpa;
105
106 let (builder, mut import_setup, inherent_data_providers) = new_full_start!(config);116 let prometheus_registry = config.prometheus_registry().cloned();
107
108 let (block_import, grandpa_link) = import_setup.take().expect(117 let telemetry_connection_sinks = sc_service::TelemetryConnectionSinks::default();
109 "Link Half and Block Import are present for Full Services or setup failed before. qed",
110 );
111118
112 let service = builder119 let rpc_extensions_builder = {
120 let client = client.clone();
121 let pool = transaction_pool.clone();
122
113 .with_finality_proof_provider(|client, backend| {123 Box::new(move |deny_unsafe, _| {
114 // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider
115 let provider = client as Arc<dyn StorageAndProofProvider<_, _>>;124 let deps = crate::rpc::FullDeps {
125 client: client.clone(),
126 pool: pool.clone(),
127 deny_unsafe,
128 };
129
116 Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)130 crate::rpc::create_full(deps)
117 })?131 })
118 .build_full()?;132 };
133
134 sc_service::spawn_tasks(sc_service::SpawnTasksParams {
135 network: network.clone(),
136 client: client.clone(),
137 keystore: keystore.clone(),
138 task_manager: &mut task_manager,
139 transaction_pool: transaction_pool.clone(),
140 telemetry_connection_sinks: telemetry_connection_sinks.clone(),
141 rpc_extensions_builder: rpc_extensions_builder,
142 on_demand: None,
143 remote_blockchain: None,
144 backend, network_status_sinks, system_rpc_tx, config,
145 })?;
119146
120 if role.is_authority() {147 if role.is_authority() {
121 let proposer = sc_basic_authorship::ProposerFactory::new(148 let proposer = sc_basic_authorship::ProposerFactory::new(
122 service.client(),149 client.clone(),
123 service.transaction_pool(),150 transaction_pool,
124 service.prometheus_registry().as_ref(),151 prometheus_registry.as_ref(),
125 );152 );
126
127 let client = service.client();
128 let select_chain = service
129 .select_chain()
130 .ok_or(ServiceError::SelectChainRequired)?;
131153
132 let can_author_with =154 let can_author_with =
133 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());155 sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone());
134156
135 let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>(157 let aura = sc_consensus_aura::start_aura::<_, _, _, _, _, AuraPair, _, _, _>(
136 sc_consensus_aura::slot_duration(&*client)?,158 sc_consensus_aura::slot_duration(&*client)?,
137 client,159 client.clone(),
138 select_chain,160 select_chain,
139 block_import,161 block_import,
140 proposer,162 proposer,
141 service.network(),163 network.clone(),
142 inherent_data_providers.clone(),164 inherent_data_providers.clone(),
143 force_authoring,165 force_authoring,
144 service.keystore(),166 keystore.clone(),
145 can_author_with,167 can_author_with,
146 )?;168 )?;
147169
148 // the AURA authoring task is considered essential, i.e. if it170 // the AURA authoring task is considered essential, i.e. if it
149 // fails we take down the service with it.171 // fails we take down the service with it.
150 service
151 .spawn_essential_task_handle()172 task_manager.spawn_essential_handle().spawn_blocking("aura", aura);
152 .spawn_blocking("aura", aura);
153 }173 }
154174
155 // if the node isn't actively participating in consensus then it doesn't175 // if the node isn't actively participating in consensus then it doesn't
156 // need a keystore, regardless of which protocol we use below.176 // need a keystore, regardless of which protocol we use below.
157 let keystore = if role.is_authority() {177 let keystore = if role.is_authority() {
158 Some(service.keystore() as sp_core::traits::BareCryptoStorePtr)178 Some(keystore as sp_core::traits::BareCryptoStorePtr)
159 } else {179 } else {
160 None180 None
161 };181 };
170 is_authority: role.is_network_authority(),190 is_authority: role.is_network_authority(),
171 };191 };
172192
173 let enable_grandpa = !disable_grandpa;
174 if enable_grandpa {193 if enable_grandpa {
175 // start the full GRANDPA voter194 // start the full GRANDPA voter
176 // NOTE: non-authorities could run the GRANDPA observer protocol, but at195 // NOTE: non-authorities could run the GRANDPA observer protocol, but at
181 let grandpa_config = sc_finality_grandpa::GrandpaParams {200 let grandpa_config = sc_finality_grandpa::GrandpaParams {
182 config: grandpa_config,201 config: grandpa_config,
183 link: grandpa_link,202 link: grandpa_link,
184 network: service.network(),203 network,
185 inherent_data_providers: inherent_data_providers.clone(),204 inherent_data_providers,
186 telemetry_on_connect: Some(service.telemetry_on_connect_stream()),205 telemetry_on_connect: Some(telemetry_connection_sinks.on_connect_stream()),
187 voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),206 voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
188 prometheus_registry: service.prometheus_registry(),207 prometheus_registry,
189 shared_voter_state: SharedVoterState::empty(),208 shared_voter_state: SharedVoterState::empty(),
190 };209 };
191210
192 // the GRANDPA voter task is considered infallible, i.e.211 // the GRANDPA voter task is considered infallible, i.e.
193 // if it fails we take down the service with it.212 // if it fails we take down the service with it.
194 service.spawn_essential_task_handle().spawn_blocking(213 task_manager.spawn_essential_handle().spawn_blocking(
195 "grandpa-voter",214 "grandpa-voter",
196 sc_finality_grandpa::run_grandpa_voter(grandpa_config)?,215 sc_finality_grandpa::run_grandpa_voter(grandpa_config)?
197 );216 );
198 } else {217 } else {
199 sc_finality_grandpa::setup_disabled_grandpa(218 sc_finality_grandpa::setup_disabled_grandpa(
200 service.client(),219 client,
201 &inherent_data_providers,220 &inherent_data_providers,
202 service.network(),221 network,
203 )?;222 )?;
204 }223 }
205224
225 network_starter.start_network();
206 Ok(service)226 Ok(task_manager)
207}227}
208228
209/// Builds a new service for a light client.229/// Builds a new service for a light client.
210pub fn new_light(config: Configuration) -> Result<impl AbstractService, ServiceError> {230pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
211 let inherent_data_providers = InherentDataProviders::new();231 let (client, backend, keystore, mut task_manager, on_demand) =
212
213 ServiceBuilder::new_light::<Block, RuntimeApi, Executor>(config)?
214 .with_select_chain(|_config, backend| Ok(LongestChain::new(backend.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")?;
219
220 let pool_api =
221 sc_transaction_pool::LightChainApi::new(builder.client().clone(), fetcher.clone());232 sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
233
222 let pool = sc_transaction_pool::BasicPool::with_revalidation_type(234 let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
223 builder.config().transaction_pool.clone(),235 config.transaction_pool.clone(),
224 Arc::new(pool_api),236 config.prometheus_registry(),
225 builder.prometheus_registry(),237 task_manager.spawn_handle(),
226 sc_transaction_pool::RevalidationType::Light,238 client.clone(),
239 on_demand.clone(),
227 );240 ));
228 Ok(pool)241
229 })?
230 .with_import_queue_and_fprb(
231 |_config,
232 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(242 let grandpa_block_import = sc_finality_grandpa::light_block_import(
245 client.clone(),243 client.clone(), backend.clone(), &(client.clone() as Arc<_>),
246 backend,
247 &(client.clone() as Arc<_>),
248 Arc::new(fetch_checker),244 Arc::new(on_demand.checker().clone()) as Arc<_>,
249 )?;245 )?;
250 let finality_proof_import = grandpa_block_import.clone();246 let finality_proof_import = grandpa_block_import.clone();
251 let finality_proof_request_builder =247 let finality_proof_request_builder =
252 finality_proof_import.create_finality_proof_request_builder();248 finality_proof_import.create_finality_proof_request_builder();
253249
254 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _>(250 let import_queue = sc_consensus_aura::import_queue::<_, _, _, AuraPair, _, _>(
255 sc_consensus_aura::slot_duration(&*client)?,251 sc_consensus_aura::slot_duration(&*client)?,
256 grandpa_block_import,252 grandpa_block_import,
257 None,253 None,
258 Some(Box::new(finality_proof_import)),254 Some(Box::new(finality_proof_import)),
259 client,255 client.clone(),
256 InherentDataProviders::new(),
260 inherent_data_providers.clone(),257 &task_manager.spawn_handle(),
261 spawn_task_handle,
262 prometheus_registry,258 config.prometheus_registry(),
259 sp_consensus::NeverCanAuthor,
263 )?;260 )?;
264261
262 let finality_proof_provider =
265 Ok((import_queue, finality_proof_request_builder))263 GrandpaFinalityProofProvider::new_for_service(backend.clone(), client.clone());
266 },264
267 )?
268 .with_finality_proof_provider(|client, backend| {
269 // GenesisAuthoritySetProvider is implemented for StorageAndProofProvider
270 let provider = client as Arc<dyn StorageAndProofProvider<_, _>>;265 let (network, network_status_sinks, system_rpc_tx, network_starter) =
266 sc_service::build_network(sc_service::BuildNetworkParams {
267 config: &config,
268 client: client.clone(),
269 transaction_pool: transaction_pool.clone(),
270 spawn_handle: task_manager.spawn_handle(),
271 import_queue,
272 on_demand: Some(on_demand.clone()),
273 block_announce_validator_builder: None,
274 finality_proof_request_builder: Some(finality_proof_request_builder),
275 finality_proof_provider: Some(finality_proof_provider),
276 })?;
277
278 if config.offchain_worker.enabled {
279 sc_service::build_offchain_workers(
280 &config, backend.clone(), task_manager.spawn_handle(), client.clone(), network.clone(),
281 );
282 }
283
271 Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)284 sc_service::spawn_tasks(sc_service::SpawnTasksParams {
285 remote_blockchain: Some(backend.remote_blockchain()),
286 transaction_pool,
287 task_manager: &mut task_manager,
288 on_demand: Some(on_demand),
289 rpc_extensions_builder: Box::new(|_, _| ()),
290 telemetry_connection_sinks: sc_service::TelemetryConnectionSinks::default(),
291 config,
292 client,
293 keystore,
294 backend,
295 network,
296 network_status_sinks,
297 system_rpc_tx,
272 })?298 })?;
299
273 .build_light()300 network_starter.start_network();
301
302 Ok(task_manager)
274}303}
275304
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.0.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.4'
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 = 'v2.0.0_release'
11version = '2.0.0-rc4'25version = '2.0.0'
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 = 'v2.0.0_release'
17version = '2.0.0-rc4'31version = '2.0.0'
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 = 'v2.0.0_release'
22version = '2.0.0-rc4'37version = '2.0.0'
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 = 'v2.0.0_release'
28version = '2.0.0-rc4'43version = '2.0.0'
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 = 'v2.0.0_release'
34version = '2.0.0-rc4'49version = '2.0.0'
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 = 'v2.0.0_release'
45version = '2.0.0-rc4'60version = '2.0.0'
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 = 'v2.0.0_release'
52version = '2.0.0-rc4'67version = '2.0.0'
5368
69[dependencies.frame-benchmarking]
70version = "2.0.0"
71default-features = false
72git = 'https://github.com/usetech-llc/substrate.git'
73branch = 'v2.0.0_release'
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 = 'v2.0.0_release'
81version = '2.0.0'
82
83[dependencies.pallet-balances]
84default-features = false
85git = 'https://github.com/usetech-llc/substrate.git'
86package = 'pallet-balances'
56description = 'FRAME pallet nft'87branch = 'v2.0.0_release'
57edition = '2018'88version = '2.0.0'
89
90[dependencies.pallet-timestamp]
58homepage = 'https://substrate.io'91default-features = false
59license = 'Unlicense'92git = 'https://github.com/usetech-llc/substrate.git'
60name = 'pallet-nft'93package = 'pallet-timestamp'
61repository = 'https://github.com/substrate-developer-hub/nft/'94branch = 'v2.0.0_release'
62version = '2.0.0-rc4'95version = '2.0.0'
96
63[package.metadata.docs.rs]97[dependencies.pallet-randomness-collective-flip]
98default-features = false
99git = 'https://github.com/usetech-llc/substrate.git'
64targets = ['x86_64-unknown-linux-gnu']100package = 'pallet-randomness-collective-flip'
101branch = 'v2.0.0_release'
102version = '2.0.0'
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
27use sp_runtime::sp_std::prelude::Vec;27use sp_runtime::sp_std::prelude::Vec;
28use sp_runtime::{28use sp_runtime::{
29 traits::{29 traits::{
30 DispatchInfoOf, Dispatchable, PostDispatchInfoOf, SaturatedConversion, Saturating,30 DispatchInfoOf, Dispatchable, PostDispatchInfoOf, Saturating, SignedExtension, Zero,
31 SignedExtension, Zero,
32 },31 },
33 transaction_validity::{32 transaction_validity::{
34 InvalidTransaction, TransactionPriority, TransactionValidity, TransactionValidityError,33 InvalidTransaction, TransactionValidity, TransactionValidityError, ValidTransaction,
35 ValidTransaction,
36 },34 },
37 FixedPointOperand, FixedU128,35 FixedPointOperand, FixedU128,
38};36};
37use pallet_contracts::ContractAddressFor;
38use sp_runtime::traits::StaticLookup;
3939
40#[cfg(test)]40#[cfg(test)]
41mod mock;41mod mock;
4242
43#[cfg(test)]43#[cfg(test)]
44mod tests;44mod tests;
4545
46mod default_weights;
47
46// Structs48// Structs
47// #region49// #region
4850
49#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]51#[derive(Encode, Decode, Eq, Debug, Clone, PartialEq)]
50#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]52#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
51pub enum CollectionMode {53pub enum CollectionMode {
52 Invalid,54 Invalid,
53 // custom data size55 NFT,
54 NFT(u32),
55 // decimal points56 // decimal points
56 Fungible(u32),57 Fungible(u32),
57 // custom data size and decimal points58 // decimal points
58 ReFungible(u32, u32),59 ReFungible(u32),
59}60}
6061
61impl Into<u8> for CollectionMode {62impl Into<u8> for CollectionMode {
62 fn into(self) -> u8 {63 fn into(self) -> u8 {
63 match self {64 match self {
64 CollectionMode::Invalid => 0,65 CollectionMode::Invalid => 0,
65 CollectionMode::NFT(_) => 1,66 CollectionMode::NFT => 1,
66 CollectionMode::Fungible(_) => 2,67 CollectionMode::Fungible(_) => 2,
67 CollectionMode::ReFungible(_, _) => 3,68 CollectionMode::ReFungible(_) => 3,
68 }69 }
69 }70 }
70}71}
104 pub name: Vec<u16>, // 64 include null escape char105 pub name: Vec<u16>, // 64 include null escape char
105 pub description: Vec<u16>, // 256 include null escape char106 pub description: Vec<u16>, // 256 include null escape char
106 pub token_prefix: Vec<u8>, // 16 include null escape char107 pub token_prefix: Vec<u8>, // 16 include null escape char
107 pub custom_data_size: u32,
108 pub mint_mode: bool,108 pub mint_mode: bool,
109 pub offchain_schema: Vec<u8>,109 pub offchain_schema: Vec<u8>,
110 pub sponsor: AccountId, // Who pays fees. If set to default address, the fees are applied to the transaction sender110 pub sponsor: AccountId, // Who pays fees. If set to default address, the fees are applied to the transaction sender
111 pub unconfirmed_sponsor: AccountId, // Sponsor address that has not yet confirmed sponsorship111 pub unconfirmed_sponsor: AccountId, // Sponsor address that has not yet confirmed sponsorship
112 pub variable_on_chain_schema: Vec<u8>, //
113 pub const_on_chain_schema: Vec<u8>, //
112}114}
113115
114#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]116#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
123pub struct NftItemType<AccountId> {125pub struct NftItemType<AccountId> {
124 pub collection: u64,126 pub collection: u64,
125 pub owner: AccountId,127 pub owner: AccountId,
126 pub data: Vec<u8>,128 pub const_data: Vec<u8>,
129 pub variable_data: Vec<u8>,
127}130}
128131
129#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]132#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
139pub struct ReFungibleItemType<AccountId> {142pub struct ReFungibleItemType<AccountId> {
140 pub collection: u64,143 pub collection: u64,
141 pub owner: Vec<Ownership<AccountId>>,144 pub owner: Vec<Ownership<AccountId>>,
142 pub data: Vec<u8>,145 pub const_data: Vec<u8>,
146 pub variable_data: Vec<u8>,
143}147}
144148
145#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]149#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
181 pub refungible_sponsor_transfer_timeout: u32,185 pub refungible_sponsor_transfer_timeout: u32,
182}186}
183187
184pub trait Trait: system::Trait {188pub trait WeightInfo {
189 fn create_collection() -> Weight;
190 fn destroy_collection() -> Weight;
191 fn add_to_white_list() -> Weight;
192 fn remove_from_white_list() -> Weight;
193 fn set_public_access_mode() -> Weight;
194 fn set_mint_permission() -> Weight;
195 fn change_collection_owner() -> Weight;
196 fn add_collection_admin() -> Weight;
197 fn remove_collection_admin() -> Weight;
198 fn set_collection_sponsor() -> Weight;
199 fn confirm_sponsorship() -> Weight;
200 fn remove_collection_sponsor() -> Weight;
201 fn create_item(s: usize) -> Weight;
202 fn burn_item() -> Weight;
203 fn transfer() -> Weight;
204 fn approve() -> Weight;
205 fn transfer_from() -> Weight;
206 fn set_offchain_schema() -> Weight;
207 fn set_const_on_chain_schema() -> Weight;
208 fn set_variable_on_chain_schema() -> Weight;
209 fn set_variable_meta_data() -> Weight;
210 // fn enable_contract_sponsoring() -> Weight;
211}
212
213#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
214#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
215pub struct CreateNftData {
216 pub const_data: Vec<u8>,
217 pub variable_data: Vec<u8>,
218}
219
220#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
221#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
222pub struct CreateFungibleData {
223}
224
225#[derive(Encode, Decode, Default, Debug, Clone, PartialEq)]
226#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
227pub struct CreateReFungibleData {
228 pub const_data: Vec<u8>,
229 pub variable_data: Vec<u8>,
230}
231
232#[derive(Encode, Decode, Debug, Clone, PartialEq)]
233#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
234pub enum CreateItemData {
235 NFT(CreateNftData),
236 Fungible(CreateFungibleData),
237 ReFungible(CreateReFungibleData)
238}
239
240impl CreateItemData {
241 pub fn len(&self) -> usize {
242 let len = match self {
243 CreateItemData::NFT(data) => data.variable_data.len() + data.const_data.len(),
244 CreateItemData::ReFungible(data) => data.variable_data.len() + data.const_data.len(),
245 _ => 0
246 };
247
248 return len;
249 }
250}
251
252impl From<CreateNftData> for CreateItemData {
253 fn from(item: CreateNftData) -> Self {
254 CreateItemData::NFT(item)
255 }
256}
257
258impl From<CreateReFungibleData> for CreateItemData {
259 fn from(item: CreateReFungibleData) -> Self {
260 CreateItemData::ReFungible(item)
261 }
262}
263
264impl From<CreateFungibleData> for CreateItemData {
265 fn from(item: CreateFungibleData) -> Self {
266 CreateItemData::Fungible(item)
267 }
268}
269
270pub trait Trait: system::Trait + Sized + transaction_payment::Trait + pallet_contracts::Trait {
185 type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;271 type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
272
273 /// Weight information for extrinsics in this pallet.
274 type WeightInfo: WeightInfo;
186}275}
187276
277#[cfg(feature = "runtime-benchmarks")]
278mod benchmarking;
279
188// #endregion280// #endregion
189281
190decl_storage! {282decl_storage! {
227 pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) u64 => Vec<BasketItem<T::AccountId, T::BlockNumber>>;319 pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) u64 => Vec<BasketItem<T::AccountId, T::BlockNumber>>;
228 pub ReFungibleTransferBasket get(fn refungible_transfer_basket): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) u64 => T::BlockNumber;320 pub ReFungibleTransferBasket get(fn refungible_transfer_basket): double_map hasher(blake2_128_concat) u64, hasher(blake2_128_concat) u64 => T::BlockNumber;
229321
230 // Sponsorship322 // Contract Sponsorship and Ownership
231 pub ContractSponsor get(fn contract_sponsor): map hasher(identity) T::AccountId => T::AccountId;323 pub ContractOwner get(fn contract_owner): map hasher(identity) T::AccountId => T::AccountId;
232 pub UnconfirmedContractSponsor get(fn unconfirmed_contract_sponsor): map hasher(identity) T::AccountId => T::AccountId;324 pub ContractSelfSponsoring get(fn contract_self_sponsoring): map hasher(identity) T::AccountId => bool;
233 }325 }
234 add_extra_genesis {326 add_extra_genesis {
235 build(|config: &GenesisConfig<T>| {327 build(|config: &GenesisConfig<T>| {
322 /// 414 ///
323 /// * mode: [CollectionMode] collection type and type dependent data.415 /// * mode: [CollectionMode] collection type and type dependent data.
324 // returns collection ID416 // returns collection ID
325 #[weight = 0]417 #[weight = T::WeightInfo::create_collection()]
326 pub fn create_collection(origin,418 pub fn create_collection(origin,
327 collection_name: Vec<u16>,419 collection_name: Vec<u16>,
328 collection_description: Vec<u16>,420 collection_description: Vec<u16>,
331423
332 // Anyone can create a collection424 // Anyone can create a collection
333 let who = ensure_signed(origin)?;425 let who = ensure_signed(origin)?;
334 let custom_data_size = match mode {
335 CollectionMode::NFT(size) => {
336426
337 // bound Custom data size
338 ensure!(size < ChainLimit::get().custom_data_limit, "Custom data size bound exceeded");
339 size
340 },
341 CollectionMode::ReFungible(size, _) => {
342
343 // bound Custom data size
344 ensure!(size < ChainLimit::get().custom_data_limit, "Custom data size bound exceeded");
345 size
346 },
347 _ => 0
348 };
349
350 let decimal_points = match mode {427 let decimal_points = match mode {
351 CollectionMode::Fungible(points) => points,428 CollectionMode::Fungible(points) => points,
352 CollectionMode::ReFungible(_, points) => points,429 CollectionMode::ReFungible(points) => points,
353 _ => 0430 _ => 0
354 };431 };
355432
395 decimal_points: decimal_points,472 decimal_points: decimal_points,
396 token_prefix: prefix,473 token_prefix: prefix,
397 offchain_schema: Vec::new(),474 offchain_schema: Vec::new(),
398 custom_data_size: custom_data_size,
399 sponsor: T::AccountId::default(),475 sponsor: T::AccountId::default(),
400 unconfirmed_sponsor: T::AccountId::default(),476 unconfirmed_sponsor: T::AccountId::default(),
477 variable_on_chain_schema: Vec::new(),
478 const_on_chain_schema: Vec::new(),
401 };479 };
402480
403 // Add new collection to map481 // Add new collection to map
418 /// # Arguments496 /// # Arguments
419 /// 497 ///
420 /// * collection_id: collection to destroy.498 /// * collection_id: collection to destroy.
421 #[weight = 0]499 #[weight = T::WeightInfo::destroy_collection()]
422 pub fn destroy_collection(origin, collection_id: u64) -> DispatchResult {500 pub fn destroy_collection(origin, collection_id: u64) -> DispatchResult {
423501
424 let sender = ensure_signed(origin)?;502 let sender = ensure_signed(origin)?;
465 /// * collection_id.543 /// * collection_id.
466 /// 544 ///
467 /// * address.545 /// * address.
468 #[weight = 0]546 #[weight = T::WeightInfo::add_to_white_list()]
469 pub fn add_to_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{547 pub fn add_to_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{
470548
471 let sender = ensure_signed(origin)?;549 let sender = ensure_signed(origin)?;
500 /// * collection_id.578 /// * collection_id.
501 /// 579 ///
502 /// * address.580 /// * address.
503 #[weight = 0]581 #[weight = T::WeightInfo::remove_from_white_list()]
504 pub fn remove_from_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{582 pub fn remove_from_white_list(origin, collection_id: u64, address: T::AccountId) -> DispatchResult{
505583
506 let sender = ensure_signed(origin)?;584 let sender = ensure_signed(origin)?;
529 /// * collection_id.607 /// * collection_id.
530 /// 608 ///
531 /// * mode: [AccessMode]609 /// * mode: [AccessMode]
532 #[weight = 0]610 #[weight = T::WeightInfo::set_public_access_mode()]
533 pub fn set_public_access_mode(origin, collection_id: u64, mode: AccessMode) -> DispatchResult611 pub fn set_public_access_mode(origin, collection_id: u64, mode: AccessMode) -> DispatchResult
534 {612 {
535 let sender = ensure_signed(origin)?;613 let sender = ensure_signed(origin)?;
555 /// * collection_id.633 /// * collection_id.
556 /// 634 ///
557 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.635 /// * mint_permission: Boolean parameter. If True, allows minting to Anyone with conditions above.
558 #[weight = 0]636 #[weight = T::WeightInfo::set_mint_permission()]
559 pub fn set_mint_permission(origin, collection_id: u64, mint_permission: bool) -> DispatchResult637 pub fn set_mint_permission(origin, collection_id: u64, mint_permission: bool) -> DispatchResult
560 {638 {
561 let sender = ensure_signed(origin)?;639 let sender = ensure_signed(origin)?;
579 /// * collection_id.657 /// * collection_id.
580 /// 658 ///
581 /// * new_owner.659 /// * new_owner.
582 #[weight = 0]660 #[weight = T::WeightInfo::change_collection_owner()]
583 pub fn change_collection_owner(origin, collection_id: u64, new_owner: T::AccountId) -> DispatchResult {661 pub fn change_collection_owner(origin, collection_id: u64, new_owner: T::AccountId) -> DispatchResult {
584662
585 let sender = ensure_signed(origin)?;663 let sender = ensure_signed(origin)?;
604 /// * collection_id: ID of the Collection to add admin for.682 /// * collection_id: ID of the Collection to add admin for.
605 /// 683 ///
606 /// * new_admin_id: Address of new admin to add.684 /// * new_admin_id: Address of new admin to add.
607 #[weight = 0]685 #[weight = T::WeightInfo::add_collection_admin()]
608 pub fn add_collection_admin(origin, collection_id: u64, new_admin_id: T::AccountId) -> DispatchResult {686 pub fn add_collection_admin(origin, collection_id: u64, new_admin_id: T::AccountId) -> DispatchResult {
609687
610 let sender = ensure_signed(origin)?;688 let sender = ensure_signed(origin)?;
638 /// * collection_id: ID of the Collection to remove admin for.716 /// * collection_id: ID of the Collection to remove admin for.
639 /// 717 ///
640 /// * account_id: Address of admin to remove.718 /// * account_id: Address of admin to remove.
641 #[weight = 0]719 #[weight = T::WeightInfo::remove_collection_admin()]
642 pub fn remove_collection_admin(origin, collection_id: u64, account_id: T::AccountId) -> DispatchResult {720 pub fn remove_collection_admin(origin, collection_id: u64, account_id: T::AccountId) -> DispatchResult {
643721
644 let sender = ensure_signed(origin)?;722 let sender = ensure_signed(origin)?;
663 /// * collection_id.741 /// * collection_id.
664 /// 742 ///
665 /// * new_sponsor.743 /// * new_sponsor.
666 #[weight = 0]744 #[weight = T::WeightInfo::set_collection_sponsor()]
667 pub fn set_collection_sponsor(origin, collection_id: u64, new_sponsor: T::AccountId) -> DispatchResult {745 pub fn set_collection_sponsor(origin, collection_id: u64, new_sponsor: T::AccountId) -> DispatchResult {
668746
669 let sender = ensure_signed(origin)?;747 let sender = ensure_signed(origin)?;
685 /// # Arguments763 /// # Arguments
686 /// 764 ///
687 /// * collection_id.765 /// * collection_id.
688 #[weight = 0]766 #[weight = T::WeightInfo::confirm_sponsorship()]
689 pub fn confirm_sponsorship(origin, collection_id: u64) -> DispatchResult {767 pub fn confirm_sponsorship(origin, collection_id: u64) -> DispatchResult {
690768
691 let sender = ensure_signed(origin)?;769 let sender = ensure_signed(origin)?;
710 /// # Arguments788 /// # Arguments
711 /// 789 ///
712 /// * collection_id.790 /// * collection_id.
713 #[weight = 0]791 #[weight = T::WeightInfo::remove_collection_sponsor()]
714 pub fn remove_collection_sponsor(origin, collection_id: u64) -> DispatchResult {792 pub fn remove_collection_sponsor(origin, collection_id: u64) -> DispatchResult {
715793
716 let sender = ensure_signed(origin)?;794 let sender = ensure_signed(origin)?;
740 /// 818 ///
741 /// * collection_id: ID of the collection.819 /// * collection_id: ID of the collection.
742 /// 820 ///
743 /// * properties: Array of bytes that contains NFT properties. Since NFT Module is agnostic of properties meaning, it is treated purely as an array of bytes.
744 ///
745 /// * owner: Address, initial owner of the NFT.821 /// * owner: Address, initial owner of the NFT.
746 #[weight = 0]822 ///
823 /// * data: Token data to store on chain.
824 // #[weight =
825 // (130_000_000 as Weight)
747 pub fn create_item(origin, collection_id: u64, properties: Vec<u8>, owner: T::AccountId) -> DispatchResult {826 // .saturating_add((2135 as Weight).saturating_mul((properties.len() as u64) as Weight))
827 // .saturating_add(RocksDbWeight::get().reads(10 as Weight))
828 // .saturating_add(RocksDbWeight::get().writes(8 as Weight))]
748829
830 #[weight = T::WeightInfo::create_item(data.len())]
831 pub fn create_item(origin, collection_id: u64, owner: T::AccountId, data: CreateItemData) -> DispatchResult {
832
749 let sender = ensure_signed(origin)?;833 let sender = ensure_signed(origin)?;
750834
751 Self::collection_exists(collection_id)?;835 Self::collection_exists(collection_id)?;
811 /// * collection_id: ID of the collection.895 /// * collection_id: ID of the collection.
812 /// 896 ///
813 /// * item_id: ID of NFT to burn.897 /// * item_id: ID of NFT to burn.
814 #[weight = 0]898 #[weight = T::WeightInfo::burn_item()]
815 pub fn burn_item(origin, collection_id: u64, item_id: u64) -> DispatchResult {899 pub fn burn_item(origin, collection_id: u64, item_id: u64) -> DispatchResult {
816900
817 let sender = ensure_signed(origin)?;901 let sender = ensure_signed(origin)?;
829913
830 match target_collection.mode914 match target_collection.mode
831 {915 {
832 CollectionMode::NFT(_) => Self::burn_nft_item(collection_id, item_id)?,916 CollectionMode::NFT => Self::burn_nft_item(collection_id, item_id)?,
833 CollectionMode::Fungible(_) => Self::burn_fungible_item(collection_id, item_id)?,917 CollectionMode::Fungible(_) => Self::burn_fungible_item(collection_id, item_id)?,
834 CollectionMode::ReFungible(_, _) => Self::burn_refungible_item(collection_id, item_id, sender.clone())?,918 CollectionMode::ReFungible(_) => Self::burn_refungible_item(collection_id, item_id, sender.clone())?,
835 _ => ()919 _ => ()
836 };920 };
837921
864 /// * Non-Fungible Mode: Ignored948 /// * Non-Fungible Mode: Ignored
865 /// * Fungible Mode: Must specify transferred amount949 /// * Fungible Mode: Must specify transferred amount
866 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)950 /// * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)
867 #[weight = 0]951 #[weight = T::WeightInfo::transfer()]
868 pub fn transfer(origin, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64) -> DispatchResult {952 pub fn transfer(origin, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64) -> DispatchResult {
869953
870 let sender = ensure_signed(origin)?;954 let sender = ensure_signed(origin)?;
882966
883 match target_collection.mode967 match target_collection.mode
884 {968 {
885 CollectionMode::NFT(_) => Self::transfer_nft(collection_id, item_id, sender.clone(), recipient)?,969 CollectionMode::NFT => Self::transfer_nft(collection_id, item_id, sender.clone(), recipient)?,
886 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, item_id, value, sender.clone(), recipient)?,970 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, item_id, value, sender.clone(), recipient)?,
887 CollectionMode::ReFungible(_, _) => Self::transfer_refungible(collection_id, item_id, value, sender.clone(), recipient)?,971 CollectionMode::ReFungible(_) => Self::transfer_refungible(collection_id, item_id, value, sender.clone(), recipient)?,
888 _ => ()972 _ => ()
889 };973 };
890974
906 /// * collection_id.990 /// * collection_id.
907 /// 991 ///
908 /// * item_id: ID of the item.992 /// * item_id: ID of the item.
909 #[weight = 0]993 #[weight = T::WeightInfo::approve()]
910 pub fn approve(origin, approved: T::AccountId, collection_id: u64, item_id: u64) -> DispatchResult {994 pub fn approve(origin, approved: T::AccountId, collection_id: u64, item_id: u64) -> DispatchResult {
911995
912 let sender = ensure_signed(origin)?;996 let sender = ensure_signed(origin)?;
964 /// * item_id: ID of the item.1048 /// * item_id: ID of the item.
965 /// 1049 ///
966 /// * value: Amount to transfer.1050 /// * value: Amount to transfer.
967 #[weight = 0]1051 #[weight = T::WeightInfo::transfer_from()]
968 pub fn transfer_from(origin, from: T::AccountId, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64 ) -> DispatchResult {1052 pub fn transfer_from(origin, from: T::AccountId, recipient: T::AccountId, collection_id: u64, item_id: u64, value: u64 ) -> DispatchResult {
9691053
970 let sender = ensure_signed(origin)?;1054 let sender = ensure_signed(origin)?;
974 if <ApprovedList<T>>::contains_key(collection_id, (item_id, from.clone())) {1058 if <ApprovedList<T>>::contains_key(collection_id, (item_id, from.clone())) {
975 let list_itm = <ApprovedList<T>>::get(collection_id, (item_id, from.clone()));1059 let list_itm = <ApprovedList<T>>::get(collection_id, (item_id, from.clone()));
976 let opt_item = list_itm.iter().find(|i| i.approved == sender.clone());1060 let opt_item = list_itm.iter().find(|i| i.approved == sender.clone());
977 appoved_transfer = opt_item.is_some();1061 if opt_item.is_some()
1062 {
1063 appoved_transfer = true;
978 ensure!(opt_item.unwrap().amount >= value, "Requested value more than approved");1064 ensure!(opt_item.unwrap().amount >= value, "Requested value more than approved");
1065 }
979 }1066 }
9801067
981 // Transfer permissions check1068 // Transfer permissions check
9961083
997 match target_collection.mode1084 match target_collection.mode
998 {1085 {
999 CollectionMode::NFT(_) => Self::transfer_nft(collection_id, item_id, from, recipient)?,1086 CollectionMode::NFT => Self::transfer_nft(collection_id, item_id, from, recipient)?,
1000 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, item_id, value, from.clone(), recipient)?,1087 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, item_id, value, from.clone(), recipient)?,
1001 CollectionMode::ReFungible(_, _) => Self::transfer_refungible(collection_id, item_id, value, from.clone(), recipient)?,1088 CollectionMode::ReFungible(_) => Self::transfer_refungible(collection_id, item_id, value, from.clone(), recipient)?,
1002 _ => ()1089 _ => ()
1003 };1090 };
10041091
1033 /// * collection_id.1120 /// * collection_id.
1034 /// 1121 ///
1035 /// * schema: String representing the offchain data schema.1122 /// * schema: String representing the offchain data schema.
1036 #[weight = 0]1123 #[weight = T::WeightInfo::set_variable_meta_data()]
1124 pub fn set_variable_meta_data (
1125 origin,
1126 collection_id: u64,
1127 item_id: u64,
1128 data: Vec<u8>
1129 ) -> DispatchResult {
1130 let sender = ensure_signed(origin)?;
1131
1132 Self::collection_exists(collection_id)?;
1133
1134 // Modify permissions check
1135 let target_collection = <Collection<T>>::get(collection_id);
1136 ensure!(Self::is_item_owner(sender.clone(), collection_id, item_id) ||
1137 Self::is_owner_or_admin_permissions(collection_id, sender.clone()),
1138 "Only item owner, collection owner and admins can modify item");
1139
1140 Self::item_exists(collection_id, item_id, &target_collection.mode)?;
1141
1142 match target_collection.mode
1143 {
1144 CollectionMode::NFT => Self::set_nft_variable_data(collection_id, item_id, data)?,
1145 CollectionMode::ReFungible(_) => Self::set_re_fungible_variable_data(collection_id, item_id, data)?,
1146 _ => ()
1147 };
1148
1149 Ok(())
1150 }
1151
1152
1153 /// Set off-chain data schema.
1154 ///
1155 /// # Permissions
1156 ///
1157 /// * Collection Owner
1158 /// * Collection Admin
1159 ///
1160 /// # Arguments
1161 ///
1162 /// * collection_id.
1163 ///
1164 /// * schema: String representing the offchain data schema.
1165 #[weight = T::WeightInfo::set_offchain_schema()]
1037 pub fn set_offchain_schema(1166 pub fn set_offchain_schema(
1038 origin,1167 origin,
1039 collection_id: u64,1168 collection_id: u64,
1049 Ok(())1178 Ok(())
1050 }1179 }
10511180
1181 /// Set const on-chain data schema.
1182 ///
1183 /// # Permissions
1184 ///
1185 /// * Collection Owner
1186 /// * Collection Admin
1187 ///
1188 /// # Arguments
1189 ///
1190 /// * collection_id.
1191 ///
1192 /// * schema: String representing the const on-chain data schema.
1193 #[weight = T::WeightInfo::set_const_on_chain_schema()]
1194 pub fn set_const_on_chain_schema (
1195 origin,
1196 collection_id: u64,
1197 schema: Vec<u8>
1198 ) -> DispatchResult {
1199 let sender = ensure_signed(origin)?;
1200 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;
1201
1202 let mut target_collection = <Collection<T>>::get(collection_id);
1203 target_collection.const_on_chain_schema = schema;
1204 <Collection<T>>::insert(collection_id, target_collection);
1205
1206 Ok(())
1207 }
1208
1209 /// Set variable on-chain data schema.
1210 ///
1211 /// # Permissions
1212 ///
1213 /// * Collection Owner
1214 /// * Collection Admin
1215 ///
1216 /// # Arguments
1217 ///
1218 /// * collection_id.
1219 ///
1220 /// * schema: String representing the variable on-chain data schema.
1221 #[weight = T::WeightInfo::set_const_on_chain_schema()]
1222 pub fn set_variable_on_chain_schema (
1223 origin,
1224 collection_id: u64,
1225 schema: Vec<u8>
1226 ) -> DispatchResult {
1227 let sender = ensure_signed(origin)?;
1228 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;
1229
1230 let mut target_collection = <Collection<T>>::get(collection_id);
1231 target_collection.variable_on_chain_schema = schema;
1232 <Collection<T>>::insert(collection_id, target_collection);
1233
1234 Ok(())
1235 }
1236
1052 // Sudo permissions function1237 // Sudo permissions function
1053 #[weight = 0]1238 #[weight = 0]
1054 pub fn set_chain_limits(1239 pub fn set_chain_limits(
1058 ensure_root(origin)?;1243 ensure_root(origin)?;
1059 <ChainLimit>::put(limits);1244 <ChainLimit>::put(limits);
1060 Ok(())1245 Ok(())
1061 } 1246 }
1247
1248 /// Enable smart contract self-sponsoring.
1249 ///
1250 /// # Permissions
1251 ///
1252 /// * Contract Owner
1253 ///
1254 /// # Arguments
1255 ///
1256 /// * contract address
1257 /// * enable flag
1258 ///
1259 #[weight = 0]
1260 pub fn enable_contract_sponsoring(
1261 origin,
1262 contract_address: T::AccountId,
1263 enable: bool
1264 ) -> DispatchResult {
1265 let sender = ensure_signed(origin)?;
1266 let mut is_owner = false;
1267 if <ContractOwner<T>>::contains_key(contract_address.clone()) {
1268 let owner = <ContractOwner<T>>::get(&contract_address);
1269 is_owner = sender == owner;
1270 }
1271 ensure!(is_owner, "Only contract owner may call this method");
1272
1273 <ContractSelfSponsoring<T>>::insert(contract_address, enable);
1274 Ok(())
1275 }
1276
1062 }1277 }
1063}1278}
1356 let target_collection = <Collection<T>>::get(collection_id);1571 let target_collection = <Collection<T>>::get(collection_id);
13571572
1358 match target_collection.mode {1573 match target_collection.mode {
1359 CollectionMode::NFT(_) => {1574 CollectionMode::NFT => {
1360 <NftItemList<T>>::get(collection_id, item_id).owner == subject1575 <NftItemList<T>>::get(collection_id, item_id).owner == subject
1361 }1576 }
1362 CollectionMode::Fungible(_) => {1577 CollectionMode::Fungible(_) => {
1363 <FungibleItemList<T>>::get(collection_id, item_id).owner == subject1578 <FungibleItemList<T>>::get(collection_id, item_id).owner == subject
1364 }1579 }
1365 CollectionMode::ReFungible(_, _) => {1580 CollectionMode::ReFungible(_) => {
1366 <ReFungibleItemList<T>>::get(collection_id, item_id)1581 <ReFungibleItemList<T>>::get(collection_id, item_id)
1367 .owner1582 .owner
1368 .iter()1583 .iter()
1597 <ApprovedList<T>>::remove(collection_id, (item_id, old_owner));1812 <ApprovedList<T>>::remove(collection_id, (item_id, old_owner));
1598 Ok(())1813 Ok(())
1599 }1814 }
1815
1816 fn item_exists(
1817 collection_id: u64,
1818 item_id: u64,
1819 mode: &CollectionMode
1820 ) -> DispatchResult {
1821 match mode {
1822 CollectionMode::NFT => ensure!(<NftItemList<T>>::contains_key(collection_id, item_id), "Item does not exists"),
1823 CollectionMode::ReFungible(_) => ensure!(<ReFungibleItemList<T>>::contains_key(collection_id, item_id), "Item does not exists"),
1824 CollectionMode::Fungible(_) => ensure!(<FungibleItemList<T>>::contains_key(collection_id, item_id), "Item does not exists"),
1825 _ => ()
1826 };
1827
1828 Ok(())
1829 }
16001830
1831 fn set_re_fungible_variable_data(
1832 collection_id: u64,
1833 item_id: u64,
1834 data: Vec<u8>
1835 ) -> DispatchResult {
1836 let mut item = <ReFungibleItemList<T>>::get(collection_id, item_id);
1837
1838 item.variable_data = data;
1839
1840 <ReFungibleItemList<T>>::insert(collection_id, item_id, item);
1841
1842 Ok(())
1843 }
1844
1845 fn set_nft_variable_data(
1846 collection_id: u64,
1847 item_id: u64,
1848 data: Vec<u8>
1849 ) -> DispatchResult {
1850 let mut item = <NftItemList<T>>::get(collection_id, item_id);
1851
1852 item.variable_data = data;
1853
1854 <NftItemList<T>>::insert(collection_id, item_id, item);
1855
1856 Ok(())
1857 }
1858
1601 fn init_collection(item: &CollectionType<T::AccountId>) {1859 fn init_collection(item: &CollectionType<T::AccountId>) {
1602 // check params1860 // check params
1603 assert!(1861 assert!(
1771/// Require the transactor pay for themselves and maybe include a tip to gain additional priority2029/// Require the transactor pay for themselves and maybe include a tip to gain additional priority
1772/// in the queue.2030/// in the queue.
1773#[derive(Encode, Decode, Clone, Eq, PartialEq)]2031#[derive(Encode, Decode, Clone, Eq, PartialEq)]
1774pub struct ChargeTransactionPayment<T: transaction_payment::Trait + Send + Sync>(2032pub struct ChargeTransactionPayment<T: Trait + Send + Sync>(
1775 #[codec(compact)] BalanceOf<T>,2033 #[codec(compact)] BalanceOf<T>
1776);2034);
17772035
1778impl<T: Trait + transaction_payment::Trait + Send + Sync> sp_std::fmt::Debug2036impl<T: Trait + Send + Sync> sp_std::fmt::Debug
1779 for ChargeTransactionPayment<T>2037 for ChargeTransactionPayment<T>
1780{2038{
1781 #[cfg(feature = "std")]2039 #[cfg(feature = "std")]
1788 }2046 }
1789}2047}
17902048
1791impl<T: Trait + transaction_payment::Trait + Send + Sync> ChargeTransactionPayment<T>2049impl<T: Trait + Send + Sync> ChargeTransactionPayment<T>
1792where2050where
1793 T::Call:2051 T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo> + IsSubType<Call<T>> + IsSubType<pallet_contracts::Call<T>>,
1794 Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo> + IsSubType<Module<T>, T>,
1795 BalanceOf<T>: Send + Sync + FixedPointOperand,2052 BalanceOf<T>: Send + Sync + FixedPointOperand,
1796{2053{
1797 /// utility constructor. Used only in client/factory code.2054 /// utility constructor. Used only in client/factory code.
18212078
1822 // Set fee based on call type. Creating collection costs 1 Unique.2079 // Set fee based on call type. Creating collection costs 1 Unique.
1823 // All other transactions have traditional fees so far2080 // All other transactions have traditional fees so far
1824 let fee = match call.is_sub_type() {2081 // let fee = match call.is_sub_type() {
1825 Some(Call::create_collection(..)) => <BalanceOf<T>>::from(1_000_000_000),2082 // Some(Call::create_collection(..)) => <BalanceOf<T>>::from(1_000_000_000),
1826 _ => Self::traditional_fee(len, info, tip), // Flat fee model, use only for testing purposes2083 // _ => Self::traditional_fee(len, info, tip), // Flat fee model, use only for testing purposes
1827 // _ => <BalanceOf<T>>::from(100)2084 // // _ => <BalanceOf<T>>::from(100)
1828 };2085 // };
2086 let fee = Self::traditional_fee(len, info, tip);
18292087
1830 // Determine who is paying transaction fee based on ecnomic model2088 // Determine who is paying transaction fee based on ecnomic model
1831 // Parse call to extract collection ID and access collection sponsor2089 // Parse call to extract collection ID and access collection sponsor
1832 let sponsor: T::AccountId = match call.is_sub_type() {2090 let mut sponsor: T::AccountId = match IsSubType::<Call<T>>::is_sub_type(call) {
1833 Some(Call::create_item(collection_id, _properties, _owner)) => {2091 Some(Call::create_item(collection_id, _properties, _owner)) => {
1834 <Collection<T>>::get(collection_id).sponsor2092 <Collection<T>>::get(collection_id).sponsor
1835 }2093 }
18382096
1839 // sponsor timeout2097 // sponsor timeout
1840 let sponsor_transfer = match _collection_mode {2098 let sponsor_transfer = match _collection_mode {
1841 CollectionMode::NFT(_) => {2099 CollectionMode::NFT => {
1842 let basket = <NftTransferBasket<T>>::get(collection_id, _item_id);2100 let basket = <NftTransferBasket<T>>::get(collection_id, _item_id);
1843 let block_number = <system::Module<T>>::block_number() as T::BlockNumber;2101 let block_number = <system::Module<T>>::block_number() as T::BlockNumber;
1844 let limit_time = basket + ChainLimit::get().nft_sponsor_transfer_timeout.into();2102 let limit_time = basket + ChainLimit::get().nft_sponsor_transfer_timeout.into();
1872 true2130 true
1873 }2131 }
1874 }2132 }
1875 CollectionMode::ReFungible(_, _) => {2133 CollectionMode::ReFungible(_) => {
1876 let basket = <ReFungibleTransferBasket<T>>::get(collection_id, _item_id);2134 let basket = <ReFungibleTransferBasket<T>>::get(collection_id, _item_id);
1877 let block_number = <system::Module<T>>::block_number() as T::BlockNumber;2135 let block_number = <system::Module<T>>::block_number() as T::BlockNumber;
1878 let limit_time = basket + ChainLimit::get().nft_sponsor_transfer_timeout.into();2136 let limit_time = basket + ChainLimit::get().nft_sponsor_transfer_timeout.into();
1898 _ => T::AccountId::default(),2156 _ => T::AccountId::default(),
1899 };2157 };
19002158
2159 // Sponsor smart contracts
2160 sponsor = match IsSubType::<pallet_contracts::Call<T>>::is_sub_type(call) {
2161
2162 // On instantiation: set the contract owner
2163 Some(pallet_contracts::Call::instantiate(_endowment, _gas_limit, code_hash, data)) => {
2164
2165 let new_contract_address = <T as pallet_contracts::Trait>::DetermineContractAddress::contract_address_for(
2166 code_hash,
2167 &data,
2168 &who,
2169 );
2170 <ContractOwner<T>>::insert(new_contract_address.clone(), who.clone());
2171
2172 T::AccountId::default()
2173 },
2174
2175 // When the contract is called, check if the sponsoring is enabled and pay fees from contract endowment if it is
2176 Some(pallet_contracts::Call::call(dest, _value, _gas_limit, _data)) => {
2177
2178 let mut sp = T::AccountId::default();
2179 let called_contract: T::AccountId = T::Lookup::lookup((*dest).clone()).unwrap_or(T::AccountId::default());
2180 if <ContractSelfSponsoring<T>>::contains_key(called_contract.clone()) {
2181 if <ContractSelfSponsoring<T>>::get(called_contract.clone()) {
2182 sp = called_contract;
2183 }
2184 }
2185
2186 sp
2187 },
2188
2189 _ => sponsor,
2190 };
2191
1901 let mut who_pays_fee: T::AccountId = sponsor.clone();2192 let mut who_pays_fee: T::AccountId = sponsor.clone();
1902 if sponsor == T::AccountId::default() {2193 if sponsor == T::AccountId::default() {
1903 who_pays_fee = who.clone();2194 who_pays_fee = who.clone();
1924 }2215 }
1925}2216}
19262217
2218
1927impl<T: Trait + transaction_payment::Trait + Send + Sync> SignedExtension2219impl<T: Trait + Send + Sync> SignedExtension
1928 for ChargeTransactionPayment<T>2220 for ChargeTransactionPayment<T>
1929where2221where
1930 BalanceOf<T>: Send + Sync + From<u64> + FixedPointOperand,2222 BalanceOf<T>: Send + Sync + From<u64> + FixedPointOperand,
1931 T::Call:2223 T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo> + IsSubType<Call<T>> + IsSubType<pallet_contracts::Call<T>>,
1932 Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo> + IsSubType<Module<T>, T>,
1933{2224{
1934 const IDENTIFIER: &'static str = "ChargeTransactionPayment";2225 const IDENTIFIER: &'static str = "ChargeTransactionPayment";
1935 type AccountId = T::AccountId;2226 type AccountId = T::AccountId;
19472238
1948 fn validate(2239 fn validate(
1949 &self,2240 &self,
1950 who: &Self::AccountId,2241 _who: &Self::AccountId,
1951 call: &Self::Call,2242 _call: &Self::Call,
1952 info: &DispatchInfoOf<Self::Call>,2243 _info: &DispatchInfoOf<Self::Call>,
1953 len: usize,2244 _len: usize,
1954 ) -> TransactionValidity {2245 ) -> TransactionValidity {
1955 let (fee, _) = self.withdraw_fee(who, call, info, len)?;2246 Ok(ValidTransaction::default())
1956
1957 let mut r = ValidTransaction::default();
1958 // NOTE: we probably want to maximize the _fee (of any type) per weight unit_ here, which
1959 // will be a bit more than setting the priority to tip. For now, this is enough.
1960 r.priority = fee.saturated_into::<TransactionPriority>();
1961 Ok(r)
1962 }2247 }
19632248
1964 fn pre_dispatch(2249 fn pre_dispatch(
2009 Ok(())2294 Ok(())
2010 }2295 }
2011}2296}
2297
2012// #endregion2298// #endregion
20132299
modifiedpallets/nft/src/mock.rsdiffbeforeafterboth
22
3use crate::{Module, Trait};3use crate::{Module, Trait};
4
5use pallet_contracts::{
6 ContractAddressFor, TrieId, TrieIdGenerator,
7};
8
4use frame_support::{9use frame_support::{
5 impl_outer_origin, parameter_types,10 impl_outer_origin, parameter_types,
6 weights::{11 weights::{
7 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},12 // constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},
8 Weight,13 Weight, IdentityFee,
9 },14 },
10};15};
11use frame_system as system;16use frame_system as system;
17use transaction_payment;
12use sp_core::H256;18use sp_core::H256;
13use sp_runtime::{19use sp_runtime::{
14 testing::Header,20 testing::Header,
15 traits::{BlakeTwo256, IdentityLookup, Saturating},21 traits::{BlakeTwo256, IdentityLookup, Saturating},
16 Perbill,22 Perbill,
17};23};
24pub use pallet_balances;
1825
19impl_outer_origin! {26impl_outer_origin! {
20 pub enum Origin for Test {}27 pub enum Origin for Test {}
35}42}
3643
37impl system::Trait for Test {44impl system::Trait for Test {
45 type BaseCallFilter = ();
38 type Origin = Origin;46 type Origin = Origin;
39 type Call = ();47 type Call = ();
40 type Index = u64;48 type Index = u64;
47 type Event = ();55 type Event = ();
48 type BlockHashCount = BlockHashCount;56 type BlockHashCount = BlockHashCount;
49 type MaximumBlockWeight = MaximumBlockWeight;57 type MaximumBlockWeight = MaximumBlockWeight;
50 type MaximumBlockLength = MaximumBlockLength;58 type DbWeight = ();
51 type AvailableBlockRatio = AvailableBlockRatio;59 type BlockExecutionWeight = ();
52 type BaseCallFilter = ();60 type ExtrinsicBaseWeight = ();
53 type DbWeight = RocksDbWeight;61 type MaximumExtrinsicWeight = MaximumBlockWeight;
54 type BlockExecutionWeight = BlockExecutionWeight;62 type MaximumBlockLength = MaximumBlockLength;
55 type ExtrinsicBaseWeight = ExtrinsicBaseWeight;63 type AvailableBlockRatio = AvailableBlockRatio;
56 type MaximumExtrinsicWeight = MaximumExtrinsicWeight;
57 type Version = ();64 type Version = ();
58 type ModuleToIndex = ();65 type PalletInfo = ();
59 type AccountData = ();66 type AccountData = pallet_balances::AccountData<u64>;
60 type OnNewAccount = ();67 type OnNewAccount = ();
61 type OnKilledAccount = ();68 type OnKilledAccount = ();
69 type SystemWeightInfo = ();
62}70}
71
72parameter_types! {
73 pub const ExistentialDeposit: u64 = 1;
74 pub const MaxLocks: u32 = 50;
75}
76
77type System = frame_system::Module<Test>;
78impl pallet_balances::Trait for Test {
79 type AccountStore = System;
80 type Balance = u64;
81 type DustRemoval = ();
82 type Event = ();
83 type ExistentialDeposit = ExistentialDeposit;
84 type WeightInfo = ();
85 type MaxLocks = MaxLocks;
86}
87
88parameter_types! {
89 pub const TransactionByteFee: u64 = 1;
90}
91impl transaction_payment::Trait for Test {
92 type Currency = pallet_balances::Module<Test>;
93 type OnTransactionPayment = ();
94 type TransactionByteFee = TransactionByteFee;
95 type WeightToFee = IdentityFee<u64>;
96 type FeeMultiplierUpdate = ();
97}
98
99
100parameter_types! {
101 pub const MinimumPeriod: u64 = 1;
102}
103impl pallet_timestamp::Trait for Test {
104 type Moment = u64;
105 type OnTimestampSet = ();
106 type MinimumPeriod = MinimumPeriod;
107 type WeightInfo = ();
108}
109
110type Timestamp = pallet_timestamp::Module<Test>;
111type Randomness = pallet_randomness_collective_flip::Module<Test>;
112
113parameter_types! {
114 pub const TombstoneDeposit: u64 = 1;
115 pub const RentByteFee: u64 = 1;
116 pub const RentDepositOffset: u64 = 1;
117 pub const SurchargeReward: u64 = 1;
118}
119
120pub struct DummyTrieIdGenerator;
121impl TrieIdGenerator<u64> for DummyTrieIdGenerator {
122 fn trie_id(account_id: &u64) -> TrieId {
123 let new_seed = *account_id + 1;
124 let mut res = vec![];
125 res.extend_from_slice(&new_seed.to_le_bytes());
126 res.extend_from_slice(&account_id.to_le_bytes());
127 res
128 }
129}
130
131pub struct DummyContractAddressFor;
132impl ContractAddressFor<H256, u64> for DummyContractAddressFor {
133 fn contract_address_for(_code_hash: &H256, _data: &[u8], origin: &u64) -> u64 {
134 *origin + 1
135 }
136}
137
138impl pallet_contracts::Trait for Test {
139 type Time = Timestamp;
140 type Randomness = Randomness;
141 type Currency = pallet_balances::Module<Test>;
142 type Event = ();
143 type DetermineContractAddress = DummyContractAddressFor;
144 type TrieIdGenerator = DummyTrieIdGenerator;
145 type RentPayment = ();
146 type SignedClaimHandicap = pallet_contracts::DefaultSignedClaimHandicap;
147 type TombstoneDeposit = TombstoneDeposit;
148 type StorageSizeOffset = pallet_contracts::DefaultStorageSizeOffset;
149 type RentByteFee = RentByteFee;
150 type RentDepositOffset = RentDepositOffset;
151 type SurchargeReward = SurchargeReward;
152 type MaxDepth = pallet_contracts::DefaultMaxDepth;
153 type MaxValueSize = pallet_contracts::DefaultMaxValueSize;
154 type WeightPrice = ();
155}
156
63impl Trait for Test {157impl Trait for Test {
64 type Event = ();158 type Event = ();
159 type WeightInfo = ();
160
65}161}
66pub type TemplateModule = Module<Test>;162pub type TemplateModule = Module<Test>;
modifiedpallets/nft/src/tests.rsdiffbeforeafterboth
1// Tests to be written here1// Tests to be written here
2use crate::mock::*;2use crate::mock::*;
3use crate::{AccessMode, ApprovePermissions, CollectionMode, Ownership, ChainLimits};3use crate::{AccessMode, ApprovePermissions, CollectionMode, Ownership, ChainLimits, CreateItemData, CreateNftData, CreateFungibleData, CreateReFungibleData};
4use frame_support::{assert_noop, assert_ok};4use frame_support::{assert_noop, assert_ok};
5use frame_system::{ RawOrigin };5use frame_system::{ RawOrigin };
66
7// Use cases tests region
8// #region
9#[test]
10fn create_nft_item() {7fn default_collection_numbers_limit() -> u64 {
11 new_test_ext().execute_with(|| {
12 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();8 10
13 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();9}
14 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
15 let mode: CollectionMode = CollectionMode::NFT(2000);
1610
17 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 11fn default_limits() {
12 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
18 collection_numbers_limit: 10,13 collection_numbers_limit: default_collection_numbers_limit(),
19 account_token_ownership_limit: 10,14 account_token_ownership_limit: 10,
20 collections_admins_limit: 5,15 collections_admins_limit: 5,
21 custom_data_limit: 2048,16 custom_data_limit: 2048,
22 nft_sponsor_transfer_timeout: 15,17 nft_sponsor_transfer_timeout: 15,
23 fungible_sponsor_transfer_timeout: 15,18 fungible_sponsor_transfer_timeout: 15,
24 refungible_sponsor_transfer_timeout: 15, 19 refungible_sponsor_transfer_timeout: 15,
25 }));20 }));
21}
2622
27 let origin1 = Origin::signed(1);23fn default_nft_data() -> CreateNftData {
24 CreateNftData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] }
25}
26
27fn default_fungible_data () -> CreateFungibleData {
28 CreateFungibleData { }
29}
30
31fn default_re_fungible_data () -> CreateReFungibleData {
32 CreateReFungibleData { const_data: vec![1, 2, 3], variable_data: vec![3, 2, 1] }
33}
34
35fn create_test_collection_for_owner(mode: &CollectionMode, owner: u64, id: u64) -> u64 {
36 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
28 assert_ok!(TemplateModule::create_collection(37 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
38 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
39
40 let origin1 = Origin::signed(owner);
41 assert_ok!(TemplateModule::create_collection(
29 origin1.clone(),42 origin1.clone(),
30 col_name1.clone(),43 col_name1.clone(),
31 col_desc1.clone(),44 col_desc1.clone(),
32 token_prefix1.clone(),45 token_prefix1.clone(),
33 mode46 mode.clone()
34 ));47 ));
35 assert_eq!(TemplateModule::collection(1).owner, 1);
3648
37 assert_ok!(TemplateModule::create_item(49 let saved_col_name: Vec<u16> = "Test1\0\0".encode_utf16().collect::<Vec<u16>>();
50 let saved_description: Vec<u16> = "TestDescription1\0\0".encode_utf16().collect::<Vec<u16>>();
51 let saved_prefix: Vec<u8> = b"token_prefix1\0\0".to_vec();
52 assert_eq!(TemplateModule::collection(id).owner, owner);
53 assert_eq!(TemplateModule::collection(id).name, saved_col_name);
54 assert_eq!(TemplateModule::collection(id).mode, *mode);
55 assert_eq!(TemplateModule::collection(id).description, saved_description);
56 assert_eq!(TemplateModule::collection(id).token_prefix, saved_prefix);
57 id
58}
59
60fn create_test_collection(mode: &CollectionMode, id: u64) -> u64 {
61 create_test_collection_for_owner(&mode, 1, id)
62}
63
64fn create_test_item(collection_id: u64, data: &CreateItemData) {
65 let origin1 = Origin::signed(1);
66 assert_ok!(TemplateModule::create_item(
38 origin1.clone(),67 origin1.clone(),
68 collection_id,
39 1,69 1,
40 [1, 2, 3].to_vec(),70 data.clone()
41 1
42 ));71 ));
72
73}
74
43 assert_eq!(TemplateModule::nft_item_id(1, 1).data, [1, 2, 3].to_vec());75// Use cases tests region
76// #region
77#[test]
78fn create_nft_item() {
79 new_test_ext().execute_with(|| {
80 default_limits();
81 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
82
83 let data = default_nft_data();
84 create_test_item(collection_id, &data.clone().into());
85 assert_eq!(TemplateModule::nft_item_id(collection_id, 1).const_data, data.const_data);
86 assert_eq!(TemplateModule::nft_item_id(collection_id, 1).variable_data, data.variable_data);
44 });87 });
45}88}
4689
91#[test]134#[test]
92fn create_refungible_item() {135fn create_refungible_item() {
93 new_test_ext().execute_with(|| {136 new_test_ext().execute_with(|| {
94 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();137 default_limits();
95 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();138 let collection_id = create_test_collection(&CollectionMode::ReFungible(3), 1);
96 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
97 let mode: CollectionMode = CollectionMode::ReFungible(2000, 3);
98139
99 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 140 let data = default_re_fungible_data();
100 collection_numbers_limit: 10,
101 account_token_ownership_limit: 10,
102 collections_admins_limit: 5,
103 custom_data_limit: 2048,
104 nft_sponsor_transfer_timeout: 15,
105 fungible_sponsor_transfer_timeout: 15,
106 refungible_sponsor_transfer_timeout: 15,
107 }));
108
109 let origin1 = Origin::signed(1);
110 assert_ok!(TemplateModule::create_collection(141 create_test_item(collection_id, &data.clone().into());
111 origin1.clone(),
112 col_name1.clone(),
113 col_desc1.clone(),
114 token_prefix1.clone(),
115 mode
116 ));
117 assert_eq!(TemplateModule::collection(1).owner, 1);
118
119 assert_ok!(TemplateModule::create_item(
120 origin1.clone(),
121 1,
122 [1, 2, 3].to_vec(),
123 1
124 ));
125 assert_eq!(142 assert_eq!(
126 TemplateModule::refungible_item_id(1, 1).data,143 TemplateModule::refungible_item_id(collection_id, 1).const_data,
127 [1, 2, 3].to_vec()144 data.const_data
128 );145 );
129 assert_eq!(146 assert_eq!(
130 TemplateModule::refungible_item_id(1, 1).owner[0],147 TemplateModule::refungible_item_id(collection_id, 1).variable_data,
148 data.variable_data
149 );
150 assert_eq!(
151 TemplateModule::refungible_item_id(collection_id, 1).owner[0],
131 Ownership {152 Ownership {
132 owner: 1,153 owner: 1,
133 fraction: 1000154 fraction: 1000
190#[test]211#[test]
191fn create_fungible_item() {212fn create_fungible_item() {
192 new_test_ext().execute_with(|| {213 new_test_ext().execute_with(|| {
193 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();214 default_limits();
194 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();215
195 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();216 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
196 let mode: CollectionMode = CollectionMode::Fungible(3);
197217
198 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 218 let data = default_fungible_data();
199 collection_numbers_limit: 10,219 create_test_item(collection_id, &data.into());
200 account_token_ownership_limit: 10,
201 collections_admins_limit: 5,
202 custom_data_limit: 2048,
203 nft_sponsor_transfer_timeout: 15,
204 fungible_sponsor_transfer_timeout: 15,
205 refungible_sponsor_transfer_timeout: 15,
206 }));
207220
208 let origin1 = Origin::signed(1);221 assert_eq!(TemplateModule::fungible_item_id(collection_id, 1).owner, 1);
209 assert_ok!(TemplateModule::create_collection(
210 origin1.clone(),
211 col_name1.clone(),
212 col_desc1.clone(),
213 token_prefix1.clone(),
214 mode
215 ));
216 assert_eq!(TemplateModule::collection(1).owner, 1);
217
218 assert_ok!(TemplateModule::create_item(
219 origin1.clone(),
220 1,
221 [].to_vec(),
222 1
223 ));
224 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 1);
225 });222 });
226}223}
227224
273#[test]270#[test]
274fn transfer_fungible_item() {271fn transfer_fungible_item() {
275 new_test_ext().execute_with(|| {272 new_test_ext().execute_with(|| {
276 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();273 default_limits();
277 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();274
278 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();275 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
279 let mode: CollectionMode = CollectionMode::Fungible(3);
280276
281 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
282 collection_numbers_limit: 10,
283 account_token_ownership_limit: 10,
284 collections_admins_limit: 5,
285 custom_data_limit: 2048,
286 nft_sponsor_transfer_timeout: 15,
287 fungible_sponsor_transfer_timeout: 15,
288 refungible_sponsor_transfer_timeout: 15,
289 }));
290
291 let origin1 = Origin::signed(1);277 let origin1 = Origin::signed(1);
292 let origin2 = Origin::signed(2);278 let origin2 = Origin::signed(2);
293 assert_ok!(TemplateModule::create_collection(
294 origin1.clone(),
295 col_name1.clone(),
296 col_desc1.clone(),
297 token_prefix1.clone(),
298 mode
299 ));
300 assert_eq!(TemplateModule::collection(1).owner, 1);
301279
302 assert_ok!(TemplateModule::create_item(280 let data = default_fungible_data();
303 origin1.clone(),
304 1,281 create_test_item(collection_id, &data.into());
305 [].to_vec(),282
306 1
307 ));
308 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 1);283 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 1);
309 assert_eq!(TemplateModule::balance_count(1, 1), 1000);284 assert_eq!(TemplateModule::balance_count(1, 1), 1000);
310 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);285 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
315 assert_eq!(TemplateModule::fungible_item_id(1, 1).value, 1000);290 assert_eq!(TemplateModule::fungible_item_id(1, 1).value, 1000);
316 assert_eq!(TemplateModule::balance_count(1, 1), 0);291 assert_eq!(TemplateModule::balance_count(1, 1), 0);
317 assert_eq!(TemplateModule::balance_count(1, 2), 1000);292 assert_eq!(TemplateModule::balance_count(1, 2), 1000);
318 assert_eq!(TemplateModule::address_tokens(1, 1), []);293 // assert_eq!(TemplateModule::address_tokens(1, 1), []);
319 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);294 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
320295
321 // split item scenario296 // split item scenario
341#[test]316#[test]
342fn transfer_refungible_item() {317fn transfer_refungible_item() {
343 new_test_ext().execute_with(|| {318 new_test_ext().execute_with(|| {
344 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();319 default_limits();
345 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();320
346 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();321 let collection_id = create_test_collection(&CollectionMode::ReFungible(3), 1);
347 let mode: CollectionMode = CollectionMode::ReFungible(2000, 3);
348322
349 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 323 let data = default_re_fungible_data();
350 collection_numbers_limit: 10,324 create_test_item(collection_id, &data.clone().into());
351 account_token_ownership_limit: 10,
352 collections_admins_limit: 5,
353 custom_data_limit: 2048,
354 nft_sponsor_transfer_timeout: 15,
355 fungible_sponsor_transfer_timeout: 15,
356 refungible_sponsor_transfer_timeout: 15,
357 }));
358325
359 let origin1 = Origin::signed(1);326 let origin1 = Origin::signed(1);
360 let origin2 = Origin::signed(2);327 let origin2 = Origin::signed(2);
361 assert_ok!(TemplateModule::create_collection(
362 origin1.clone(),
363 col_name1.clone(),
364 col_desc1.clone(),
365 token_prefix1.clone(),
366 mode
367 ));
368 assert_eq!(TemplateModule::collection(1).owner, 1);
369
370 assert_ok!(TemplateModule::create_item(
371 origin1.clone(),
372 1,
373 [1, 2, 3].to_vec(),
374 1
375 ));
376 assert_eq!(328 assert_eq!(
377 TemplateModule::refungible_item_id(1, 1).data,329 TemplateModule::refungible_item_id(collection_id, 1).const_data,
378 [1, 2, 3].to_vec()330 data.const_data
379 );331 );
380 assert_eq!(332 assert_eq!(
381 TemplateModule::refungible_item_id(1, 1).owner[0],333 TemplateModule::refungible_item_id(collection_id, 1).variable_data,
334 data.variable_data
335 );
336 assert_eq!(
337 TemplateModule::refungible_item_id(collection_id, 1).owner[0],
382 Ownership {338 Ownership {
383 owner: 1,339 owner: 1,
384 fraction: 1000340 fraction: 1000
398 );354 );
399 assert_eq!(TemplateModule::balance_count(1, 1), 0);355 assert_eq!(TemplateModule::balance_count(1, 1), 0);
400 assert_eq!(TemplateModule::balance_count(1, 2), 1000);356 assert_eq!(TemplateModule::balance_count(1, 2), 1000);
401 assert_eq!(TemplateModule::address_tokens(1, 1), []);357 // assert_eq!(TemplateModule::address_tokens(1, 1), []);
402 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);358 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
403359
404 // split item scenario360 // split item scenario
448#[test]404#[test]
449fn transfer_nft_item() {405fn transfer_nft_item() {
450 new_test_ext().execute_with(|| {406 new_test_ext().execute_with(|| {
451 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();407 default_limits();
452 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();408
453 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();409 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
454 let mode: CollectionMode = CollectionMode::NFT(2000);
455410
456 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 411 let data = default_nft_data();
457 collection_numbers_limit: 10,
458 account_token_ownership_limit: 10,
459 collections_admins_limit: 5,
460 custom_data_limit: 2048,
461 nft_sponsor_transfer_timeout: 15,
462 fungible_sponsor_transfer_timeout: 15,
463 refungible_sponsor_transfer_timeout: 15,
464 }));
465
466 let origin1 = Origin::signed(1);
467 assert_ok!(TemplateModule::create_collection(412 create_test_item(collection_id, &data.into());
468 origin1.clone(),
469 col_name1.clone(),
470 col_desc1.clone(),
471 token_prefix1.clone(),
472 mode
473 ));
474 assert_eq!(TemplateModule::collection(1).owner, 1);
475
476 assert_ok!(TemplateModule::create_item(
477 origin1.clone(),
478 1,
479 [1, 2, 3].to_vec(),
480 1
481 ));
482 assert_eq!(TemplateModule::nft_item_id(1, 1).data, [1, 2, 3].to_vec());
483 assert_eq!(TemplateModule::balance_count(1, 1), 1);413 assert_eq!(TemplateModule::balance_count(1, 1), 1);
484 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);414 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
485415
416 let origin1 = Origin::signed(1);
486 // default scenario417 // default scenario
487 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1000));418 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1000));
488 assert_eq!(TemplateModule::nft_item_id(1, 1).owner, 2);419 assert_eq!(TemplateModule::nft_item_id(1, 1).owner, 2);
489 assert_eq!(TemplateModule::balance_count(1, 1), 0);420 assert_eq!(TemplateModule::balance_count(1, 1), 0);
490 assert_eq!(TemplateModule::balance_count(1, 2), 1);421 assert_eq!(TemplateModule::balance_count(1, 2), 1);
491 assert_eq!(TemplateModule::address_tokens(1, 1), []);422 // assert_eq!(TemplateModule::address_tokens(1, 1), []);
492 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);423 assert_eq!(TemplateModule::address_tokens(1, 2), [1]);
493 });424 });
494}425}
495426
496#[test]427#[test]
497fn nft_approve_and_transfer_from() {428fn nft_approve_and_transfer_from() {
498 new_test_ext().execute_with(|| {429 new_test_ext().execute_with(|| {
499 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();430 default_limits();
500 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();431
501 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();432 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
502 let mode: CollectionMode = CollectionMode::NFT(2000);
503433
504 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 434 let data = default_nft_data();
505 collection_numbers_limit: 10,435 create_test_item(collection_id, &data.into());
506 account_token_ownership_limit: 10,
507 collections_admins_limit: 5,
508 custom_data_limit: 2048,
509 nft_sponsor_transfer_timeout: 15,
510 fungible_sponsor_transfer_timeout: 15,
511 refungible_sponsor_transfer_timeout: 15,
512 }));
513436
514 let origin1 = Origin::signed(1);437 let origin1 = Origin::signed(1);
515 let origin2 = Origin::signed(2);438 let origin2 = Origin::signed(2);
516 assert_ok!(TemplateModule::create_collection(
517 origin1.clone(),
518 col_name1.clone(),
519 col_desc1.clone(),
520 token_prefix1.clone(),
521 mode
522 ));
523 assert_eq!(TemplateModule::collection(1).owner, 1);
524439
525 assert_ok!(TemplateModule::create_item(440 assert_eq!(TemplateModule::balance_count(1, 1), 1);
441 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
442
443 // neg transfer
444 assert_noop!(TemplateModule::transfer_from(
526 origin1.clone(),445 origin2.clone(),
527 1,446 1,
528 [1, 2, 3].to_vec(),447 2,
448 1,
449 1,
450 1), "Only item owner, collection owner and admins can modify items");
451
452 // do approve
453 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));
454 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 1);
455 assert_eq!(
456 TemplateModule::approved(1, (1, 1))[0],
457 ApprovePermissions {
458 approved: 2,
459 amount: 100000000
460 }
461 );
462
463 assert_ok!(TemplateModule::transfer_from(
464 origin2.clone(),
465 1,
466 2,
467 1,
468 1,
529 1469 1
530 ));470 ));
531 assert_eq!(TemplateModule::nft_item_id(1, 1).data, [1, 2, 3].to_vec());471 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 0);
472 });
473}
474
475#[test]
476fn nft_approve_and_transfer_from_white_list() {
477 new_test_ext().execute_with(|| {
478 default_limits();
479
480 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
481
482 let origin1 = Origin::signed(1);
483 let origin2 = Origin::signed(2);
484
485 let data = default_nft_data();
486 create_test_item(collection_id, &data.clone().into());
487
488 assert_eq!(TemplateModule::nft_item_id(1, 1).const_data, data.const_data);
532 assert_eq!(TemplateModule::balance_count(1, 1), 1);489 assert_eq!(TemplateModule::balance_count(1, 1), 1);
533 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);490 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
534491
574#[test]531#[test]
575fn refungible_approve_and_transfer_from() {532fn refungible_approve_and_transfer_from() {
576 new_test_ext().execute_with(|| {533 new_test_ext().execute_with(|| {
577 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();534 default_limits();
578 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();535
579 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();536 let collection_id = create_test_collection(&CollectionMode::ReFungible(3), 1);
580 let mode: CollectionMode = CollectionMode::ReFungible(2000, 3);
581
582 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 537
583 collection_numbers_limit: 10,
584 account_token_ownership_limit: 10,
585 collections_admins_limit: 5,
586 custom_data_limit: 2048,
587 nft_sponsor_transfer_timeout: 15,
588 fungible_sponsor_transfer_timeout: 15,
589 refungible_sponsor_transfer_timeout: 15,
590 }));
591
592 let origin1 = Origin::signed(1);538 let origin1 = Origin::signed(1);
593 let origin2 = Origin::signed(2);539 let origin2 = Origin::signed(2);
594 assert_ok!(TemplateModule::create_collection(
595 origin1.clone(),
596 col_name1.clone(),
597 col_desc1.clone(),
598 token_prefix1.clone(),
599 mode
600 ));
601 assert_eq!(TemplateModule::collection(1).owner, 1);
602540
603 assert_ok!(TemplateModule::create_item(541 let data = default_re_fungible_data();
604 origin1.clone(),
605 1,
606 [1, 2, 3].to_vec(),
607 1
608 ));
609 assert_eq!(542 create_test_item(collection_id, &data.into());
610 TemplateModule::refungible_item_id(1, 1).data,543
611 [1, 2, 3].to_vec()
612 );
613 assert_eq!(
614 TemplateModule::refungible_item_id(1, 1).owner[0],
615 Ownership {
616 owner: 1,
617 fraction: 1000
618 }
619 );
620 assert_eq!(TemplateModule::balance_count(1, 1), 1000);544 assert_eq!(TemplateModule::balance_count(1, 1), 1000);
621 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);545 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
622546
674#[test]598#[test]
675fn fungible_approve_and_transfer_from() {599fn fungible_approve_and_transfer_from() {
676 new_test_ext().execute_with(|| {600 new_test_ext().execute_with(|| {
677 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();601 default_limits();
602
678 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();603 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
679 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();604
605 let data = default_fungible_data();
680 let mode: CollectionMode = CollectionMode::Fungible(3);606 create_test_item(collection_id, &data.into());
681607
682 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
683 collection_numbers_limit: 10,
684 account_token_ownership_limit: 10,
685 collections_admins_limit: 5,
686 custom_data_limit: 2048,
687 nft_sponsor_transfer_timeout: 15,
688 fungible_sponsor_transfer_timeout: 15,
689 refungible_sponsor_transfer_timeout: 15,
690 }));
691
692 let origin1 = Origin::signed(1);608 let origin1 = Origin::signed(1);
693 let origin2 = Origin::signed(2);609 let origin2 = Origin::signed(2);
694 assert_ok!(TemplateModule::create_collection(
695 origin1.clone(),
696 col_name1.clone(),
697 col_desc1.clone(),
698 token_prefix1.clone(),
699 mode
700 ));
701 assert_eq!(TemplateModule::collection(1).owner, 1);
702610
703 assert_ok!(TemplateModule::create_item(
704 origin1.clone(),
705 1,
706 [].to_vec(),
707 1
708 ));
709 assert_eq!(TemplateModule::fungible_item_id(1, 1).owner, 1);
710 assert_eq!(TemplateModule::balance_count(1, 1), 1000);611 assert_eq!(TemplateModule::balance_count(1, 1), 1000);
711 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);612 assert_eq!(TemplateModule::address_tokens(1, 1), [1]);
712613
770 ));671 ));
771 assert_eq!(TemplateModule::balance_count(1, 1), 0);672 assert_eq!(TemplateModule::balance_count(1, 1), 0);
772 assert_eq!(TemplateModule::balance_count(1, 3), 1000);673 assert_eq!(TemplateModule::balance_count(1, 3), 1000);
773 assert_eq!(TemplateModule::address_tokens(1, 1), []);674 // assert_eq!(TemplateModule::address_tokens(1, 1), []);
774 assert_eq!(TemplateModule::address_tokens(1, 3), [2]);675 assert_eq!(TemplateModule::address_tokens(1, 3), [2]);
775676
776 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 0);677 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 0);
780#[test]681#[test]
781fn change_collection_owner() {682fn change_collection_owner() {
782 new_test_ext().execute_with(|| {683 new_test_ext().execute_with(|| {
783 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();684 default_limits();
784 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();685
785 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();686 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
786 let mode: CollectionMode = CollectionMode::NFT(2000);
787
788 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 687
789 collection_numbers_limit: 10,
790 account_token_ownership_limit: 10,
791 collections_admins_limit: 5,
792 custom_data_limit: 2048,
793 nft_sponsor_transfer_timeout: 15,
794 fungible_sponsor_transfer_timeout: 15,
795 refungible_sponsor_transfer_timeout: 15,
796 }));
797
798 let origin1 = Origin::signed(1);688 let origin1 = Origin::signed(1);
799 assert_ok!(TemplateModule::create_collection(
800 origin1.clone(),
801 col_name1.clone(),
802 col_desc1.clone(),
803 token_prefix1.clone(),
804 mode
805 ));
806 assert_ok!(TemplateModule::change_collection_owner(689 assert_ok!(TemplateModule::change_collection_owner(
807 origin1.clone(),690 origin1.clone(),
808 1,691 collection_id,
809 2692 2
810 ));693 ));
811 assert_eq!(TemplateModule::collection(1).owner, 2);694 assert_eq!(TemplateModule::collection(collection_id).owner, 2);
812 });695 });
813}696}
814697
815#[test]698#[test]
816fn destroy_collection() {699fn destroy_collection() {
817 new_test_ext().execute_with(|| {700 new_test_ext().execute_with(|| {
818 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();701 default_limits();
819 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();702
820 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();703 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
821 let mode: CollectionMode = CollectionMode::NFT(2000);
822
823 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 704
824 collection_numbers_limit: 10,
825 account_token_ownership_limit: 10,
826 collections_admins_limit: 5,
827 custom_data_limit: 2048,
828 nft_sponsor_transfer_timeout: 15,
829 fungible_sponsor_transfer_timeout: 15,
830 refungible_sponsor_transfer_timeout: 15,
831 }));
832
833 let origin1 = Origin::signed(1);705 let origin1 = Origin::signed(1);
834 assert_ok!(TemplateModule::create_collection(706 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), collection_id));
835 origin1.clone(),
836 col_name1.clone(),
837 col_desc1.clone(),
838 token_prefix1.clone(),
839 mode
840 ));
841 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), 1));
842 });707 });
843}708}
844709
845#[test]710#[test]
846fn burn_nft_item() {711fn burn_nft_item() {
847 new_test_ext().execute_with(|| {712 new_test_ext().execute_with(|| {
848 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();713 default_limits();
849 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();714
850 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();715 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
851 let mode: CollectionMode = CollectionMode::NFT(2000);
852716
853 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
854 collection_numbers_limit: 10,
855 account_token_ownership_limit: 10,
856 collections_admins_limit: 5,
857 custom_data_limit: 2048,
858 nft_sponsor_transfer_timeout: 15,
859 fungible_sponsor_transfer_timeout: 15,
860 refungible_sponsor_transfer_timeout: 15,
861 }));
862
863 let origin1 = Origin::signed(1);717 let origin1 = Origin::signed(1);
864 assert_ok!(TemplateModule::create_collection(718 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
865 origin1.clone(),
866 col_name1.clone(),
867 col_desc1.clone(),
868 token_prefix1.clone(),
869 mode
870 ));
871 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));
872 assert_ok!(TemplateModule::create_item(719
873 origin1.clone(),720 let data = default_nft_data();
874 1,721 create_test_item(collection_id, &data.into());
875 [1, 2, 3].to_vec(),
876 1
877 ));
878722
879 assert_eq!(TemplateModule::nft_item_id(1, 1).data, [1, 2, 3].to_vec());
880
881 // check balance (collection with id = 1, user id = 1)723 // check balance (collection with id = 1, user id = 1)
882 assert_eq!(TemplateModule::balance_count(1, 1), 1);724 assert_eq!(TemplateModule::balance_count(1, 1), 1);
883725
895#[test]737#[test]
896fn burn_fungible_item() {738fn burn_fungible_item() {
897 new_test_ext().execute_with(|| {739 new_test_ext().execute_with(|| {
898 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();740 default_limits();
899 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();741
900 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();742 let collection_id = create_test_collection(&CollectionMode::Fungible(3), 1);
901 let mode: CollectionMode = CollectionMode::Fungible(3);
902
903 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
904 collection_numbers_limit: 10,743
905 account_token_ownership_limit: 10,
906 collections_admins_limit: 5,
907 custom_data_limit: 2048,
908 nft_sponsor_transfer_timeout: 15,
909 fungible_sponsor_transfer_timeout: 15,
910 refungible_sponsor_transfer_timeout: 15,
911 }));
912
913 let origin1 = Origin::signed(1);744 let origin1 = Origin::signed(1);
914 assert_ok!(TemplateModule::create_collection(745 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
915 origin1.clone(),
916 col_name1.clone(),
917 col_desc1.clone(),
918 token_prefix1.clone(),
919 mode
920 ));
921 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));
922 assert_ok!(TemplateModule::create_item(746
923 origin1.clone(),747 let data = default_fungible_data();
924 1,748 create_test_item(collection_id, &data.into());
925 [].to_vec(),
926 1
927 ));
928749
929 // check balance (collection with id = 1, user id = 1)750 // check balance (collection with id = 1, user id = 1)
930 assert_eq!(TemplateModule::balance_count(1, 1), 1000);751 assert_eq!(TemplateModule::balance_count(1, 1), 1000);
943#[test]764#[test]
944fn burn_refungible_item() {765fn burn_refungible_item() {
945 new_test_ext().execute_with(|| {766 new_test_ext().execute_with(|| {
946 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();767 default_limits();
947 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();768
948 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();769 let collection_id = create_test_collection(&CollectionMode::ReFungible(3), 1);
949 let mode: CollectionMode = CollectionMode::ReFungible(200, 3);
950
951 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
952 collection_numbers_limit: 10,
953 account_token_ownership_limit: 10,
954 collections_admins_limit: 5,
955 custom_data_limit: 2048,
956 nft_sponsor_transfer_timeout: 15,
957 fungible_sponsor_transfer_timeout: 15,
958 refungible_sponsor_transfer_timeout: 15,
959 }));
960
961 let origin1 = Origin::signed(1);770 let origin1 = Origin::signed(1);
962 let origin2 = Origin::signed(2);
963 assert_ok!(TemplateModule::create_collection(
964 origin1.clone(),
965 col_name1.clone(),
966 col_desc1.clone(),
967 token_prefix1.clone(),
968 mode
969 ));
970771
971 assert_ok!(TemplateModule::set_mint_permission(772 assert_ok!(TemplateModule::set_mint_permission(
972 origin1.clone(),773 origin1.clone(),
973 1,774 collection_id,
974 true775 true
975 ));776 ));
976 assert_ok!(TemplateModule::set_public_access_mode(777 assert_ok!(TemplateModule::set_public_access_mode(
977 origin1.clone(),778 origin1.clone(),
978 1,779 collection_id,
979 AccessMode::WhiteList780 AccessMode::WhiteList
980 ));781 ));
981 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));782 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
982783
983 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));784 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));
984 assert_ok!(TemplateModule::create_item(785
985 origin2.clone(),786 let data = default_re_fungible_data();
986 1,787 create_test_item(collection_id, &data.into());
987 [1, 2, 3].to_vec(),
988 1
989 ));
990788
991 assert_eq!(
992 TemplateModule::refungible_item_id(1, 1).data,
993 [1, 2, 3].to_vec()
994 );
995
996 // check balance (collection with id = 1, user id = 2)789 // check balance (collection with id = 1, user id = 2)
997 assert_eq!(TemplateModule::balance_count(1, 1), 1000);790 assert_eq!(TemplateModule::balance_count(1, 1), 1000);
998791
1010#[test]803#[test]
1011fn add_collection_admin() {804fn add_collection_admin() {
1012 new_test_ext().execute_with(|| {805 new_test_ext().execute_with(|| {
1013 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();806 default_limits();
1014 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();807
1015 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();808 let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);
1016 let mode: CollectionMode = CollectionMode::NFT(2000);
1017
1018 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 809 create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);
1019 collection_numbers_limit: 10,
1020 account_token_ownership_limit: 10,
1021 collections_admins_limit: 5,810 create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);
1022 custom_data_limit: 2048,
1023 nft_sponsor_transfer_timeout: 15,
1024 fungible_sponsor_transfer_timeout: 15,
1025 refungible_sponsor_transfer_timeout: 15, 811
1026 }));
1027
1028 let origin1 = Origin::signed(1);812 let origin1 = Origin::signed(1);
1029 let origin2 = Origin::signed(2);
1030 let origin3 = Origin::signed(3);
1031 assert_ok!(TemplateModule::create_collection(
1032 origin1.clone(),
1033 col_name1.clone(),
1034 col_desc1.clone(),
1035 token_prefix1.clone(),
1036 mode.clone()
1037 ));
1038 assert_ok!(TemplateModule::create_collection(
1039 origin2.clone(),
1040 col_name1.clone(),
1041 col_desc1.clone(),
1042 token_prefix1.clone(),
1043 mode.clone()
1044 ));
1045 assert_ok!(TemplateModule::create_collection(
1046 origin3.clone(),
1047 col_name1.clone(),
1048 col_desc1.clone(),
1049 token_prefix1.clone(),
1050 mode.clone()
1051 ));
1052813
1053 assert_eq!(TemplateModule::collection(1).owner, 1);
1054 assert_eq!(TemplateModule::collection(2).owner, 2);
1055 assert_eq!(TemplateModule::collection(3).owner, 3);
1056
1057 // collection admin814 // collection admin
1058 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));815 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection1_id, 2));
1059 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 3));816 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection1_id, 3));
1060817
1061 assert_eq!(TemplateModule::admin_list_collection(1).contains(&2), true);818 assert_eq!(TemplateModule::admin_list_collection(collection1_id).contains(&2), true);
1062 assert_eq!(TemplateModule::admin_list_collection(1).contains(&3), true);819 assert_eq!(TemplateModule::admin_list_collection(collection1_id).contains(&3), true);
1063 });820 });
1064}821}
1065822
1066#[test]823#[test]
1067fn remove_collection_admin() {824fn remove_collection_admin() {
1068 new_test_ext().execute_with(|| {825 new_test_ext().execute_with(|| {
1069 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();826 default_limits();
827
1070 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();828 let collection1_id = create_test_collection_for_owner(&CollectionMode::NFT, 1, 1);
1071 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();829 create_test_collection_for_owner(&CollectionMode::NFT, 2, 2);
1072 let mode: CollectionMode = CollectionMode::NFT(2000);830 create_test_collection_for_owner(&CollectionMode::NFT, 3, 3);
1073831
1074 let origin1 = Origin::signed(1);832 let origin1 = Origin::signed(1);
1075 let origin2 = Origin::signed(2);833 let origin2 = Origin::signed(2);
1076 let origin3 = Origin::signed(3);
1077834
1078 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1079 collection_numbers_limit: 10,
1080 account_token_ownership_limit: 10,
1081 collections_admins_limit: 5,
1082 custom_data_limit: 2048,
1083 nft_sponsor_transfer_timeout: 15,
1084 fungible_sponsor_transfer_timeout: 15,
1085 refungible_sponsor_transfer_timeout: 15,
1086 }));
1087
1088 assert_ok!(TemplateModule::create_collection(
1089 origin1.clone(),
1090 col_name1.clone(),
1091 col_desc1.clone(),
1092 token_prefix1.clone(),
1093 mode.clone()
1094 ));
1095 assert_ok!(TemplateModule::create_collection(
1096 origin2.clone(),
1097 col_name1.clone(),
1098 col_desc1.clone(),
1099 token_prefix1.clone(),
1100 mode.clone()
1101 ));
1102 assert_ok!(TemplateModule::create_collection(
1103 origin3.clone(),
1104 col_name1.clone(),
1105 col_desc1.clone(),
1106 token_prefix1.clone(),
1107 mode.clone()
1108 ));
1109
1110 assert_eq!(TemplateModule::collection(1).owner, 1);
1111 assert_eq!(TemplateModule::collection(2).owner, 2);
1112 assert_eq!(TemplateModule::collection(3).owner, 3);
1113
1114 // collection admin835 // collection admin
1115 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));836 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection1_id, 2));
1116 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 3));837 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection1_id, 3));
1117838
1118 assert_eq!(TemplateModule::admin_list_collection(1).contains(&2), true);839 assert_eq!(TemplateModule::admin_list_collection(1).contains(&2), true);
1119 assert_eq!(TemplateModule::admin_list_collection(1).contains(&3), true);840 assert_eq!(TemplateModule::admin_list_collection(1).contains(&3), true);
1131#[test]852#[test]
1132fn balance_of() {853fn balance_of() {
1133 new_test_ext().execute_with(|| {854 new_test_ext().execute_with(|| {
1134 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();855 default_limits();
1135 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();856
1136 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();857 let nft_collection_id = create_test_collection(&CollectionMode::NFT, 1);
1137 let nft_mode: CollectionMode = CollectionMode::NFT(2000);
1138 let furg_mode: CollectionMode = CollectionMode::Fungible(3);858 let fungible_collection_id = create_test_collection(&CollectionMode::Fungible(3), 2);
1139 let refung_mode: CollectionMode = CollectionMode::ReFungible(2000, 3);
1140
1141 let origin1 = Origin::signed(1);859 let re_fungible_collection_id = create_test_collection(&CollectionMode::ReFungible(3), 3);
1142
1143 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1144 collection_numbers_limit: 10,
1145 account_token_ownership_limit: 10,
1146 collections_admins_limit: 5,
1147 custom_data_limit: 2048,
1148 nft_sponsor_transfer_timeout: 15,
1149 fungible_sponsor_transfer_timeout: 15,
1150 refungible_sponsor_transfer_timeout: 15,
1151 }));
1152
1153 assert_ok!(TemplateModule::create_collection(860
1154 origin1.clone(),
1155 col_name1.clone(),
1156 col_desc1.clone(),
1157 token_prefix1.clone(),
1158 nft_mode.clone()
1159 ));
1160 assert_ok!(TemplateModule::create_collection(
1161 origin1.clone(),
1162 col_name1.clone(),
1163 col_desc1.clone(),
1164 token_prefix1.clone(),
1165 furg_mode.clone()
1166 ));
1167 assert_ok!(TemplateModule::create_collection(
1168 origin1.clone(),
1169 col_name1.clone(),
1170 col_desc1.clone(),
1171 token_prefix1.clone(),
1172 refung_mode.clone()
1173 ));
1174
1175 assert_eq!(TemplateModule::collection(1).owner, 1);
1176 assert_eq!(TemplateModule::collection(2).owner, 1);
1177 assert_eq!(TemplateModule::collection(3).owner, 1);
1178
1179 // check balance before861 // check balance before
1180 assert_eq!(TemplateModule::balance_count(1, 1), 0);862 assert_eq!(TemplateModule::balance_count(nft_collection_id, 1), 0);
1181 assert_eq!(TemplateModule::balance_count(2, 1), 0);863 assert_eq!(TemplateModule::balance_count(fungible_collection_id, 1), 0);
1182 assert_eq!(TemplateModule::balance_count(3, 1), 0);864 assert_eq!(TemplateModule::balance_count(re_fungible_collection_id, 1), 0);
1183865
1184 // create item866 let nft_data = default_nft_data();
1185 assert_ok!(TemplateModule::create_item(867 create_test_item(nft_collection_id, &nft_data.into());
1186 origin1.clone(),868
1187 1,869 let fungible_data = default_fungible_data();
1188 [1, 1, 1].to_vec(),870 create_test_item(fungible_collection_id, &fungible_data.into());
871
1189 1872 let re_fungible_data = default_re_fungible_data();
1190 ));873 create_test_item(re_fungible_collection_id, &re_fungible_data.into());
1191874
1192 assert_ok!(TemplateModule::create_item(
1193 origin1.clone(),
1194 2,
1195 [].to_vec(),
1196 1
1197 ));
1198
1199 assert_ok!(TemplateModule::create_item(
1200 origin1.clone(),
1201 3,
1202 [1, 1, 1].to_vec(),
1203 1
1204 ));
1205
1206 // check balance (collection with id = 1, user id = 1)875 // check balance (collection with id = 1, user id = 1)
1207 assert_eq!(TemplateModule::balance_count(1, 1), 1);876 assert_eq!(TemplateModule::balance_count(nft_collection_id, 1), 1);
1208 assert_eq!(TemplateModule::balance_count(2, 1), 1000);877 assert_eq!(TemplateModule::balance_count(fungible_collection_id, 1), 1000);
1209 assert_eq!(TemplateModule::balance_count(3, 1), 1000);878 assert_eq!(TemplateModule::balance_count(re_fungible_collection_id, 1), 1000);
1210 assert_eq!(TemplateModule::nft_item_id(1, 1).owner, 1);879 assert_eq!(TemplateModule::nft_item_id(nft_collection_id, 1).owner, 1);
1211 assert_eq!(TemplateModule::fungible_item_id(2, 1).owner, 1);880 assert_eq!(TemplateModule::fungible_item_id(fungible_collection_id, 1).owner, 1);
1212 assert_eq!(TemplateModule::refungible_item_id(3, 1).owner[0].owner, 1);881 assert_eq!(TemplateModule::refungible_item_id(re_fungible_collection_id, 1).owner[0].owner, 1);
1213 });882 });
1214}883}
1215884
1216#[test]885#[test]
1217fn approve() {886fn approve() {
1218 new_test_ext().execute_with(|| {887 new_test_ext().execute_with(|| {
1219 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();888 default_limits();
889
1220 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();890 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1221 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();891
1222 let nft_mode: CollectionMode = CollectionMode::NFT(2000);892 let data = default_nft_data();
1223 let origin1 = Origin::signed(1);893 create_test_item(collection_id, &data.into());
1224894
1225 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 895 let origin1 = Origin::signed(1);
1226 collection_numbers_limit: 10,
1227 account_token_ownership_limit: 10,
1228 collections_admins_limit: 5,
1229 custom_data_limit: 2048,
1230 nft_sponsor_transfer_timeout: 15,
1231 fungible_sponsor_transfer_timeout: 15,
1232 refungible_sponsor_transfer_timeout: 15,
1233 }));
1234
1235 assert_ok!(TemplateModule::create_collection(
1236 origin1.clone(),
1237 col_name1.clone(),
1238 col_desc1.clone(),
1239 token_prefix1.clone(),
1240 nft_mode.clone()
1241 ));
1242
1243 assert_eq!(TemplateModule::collection(1).owner, 1);
1244
1245 // create item896
1246 assert_ok!(TemplateModule::create_item(
1247 origin1.clone(),
1248 1,
1249 [1, 1, 1].to_vec(),
1250 1
1251 ));
1252
1253 // approve897 // approve
1254 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));898 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));
1259#[test]903#[test]
1260fn transfer_from() {904fn transfer_from() {
1261 new_test_ext().execute_with(|| {905 new_test_ext().execute_with(|| {
1262 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();906 default_limits();
1263 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();907
1264 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();908 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1265 let mode: CollectionMode = CollectionMode::NFT(2000);
1266 let origin1 = Origin::signed(1);909 let origin1 = Origin::signed(1);
1267 let origin2 = Origin::signed(2);910 let origin2 = Origin::signed(2);
1268911
1269 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 912 let data = default_nft_data();
1270 collection_numbers_limit: 10,913 create_test_item(collection_id, &data.into());
1271 account_token_ownership_limit: 10,
1272 collections_admins_limit: 5,
1273 custom_data_limit: 2048,
1274 nft_sponsor_transfer_timeout: 15,
1275 fungible_sponsor_transfer_timeout: 15,
1276 refungible_sponsor_transfer_timeout: 15,
1277 }));
1278914
1279 assert_ok!(TemplateModule::create_collection(
1280 origin1.clone(),
1281 col_name1.clone(),
1282 col_desc1.clone(),
1283 token_prefix1.clone(),
1284 mode
1285 ));
1286
1287 assert_eq!(TemplateModule::collection(1).owner, 1);
1288
1289 // create item
1290 assert_ok!(TemplateModule::create_item(
1291 origin1.clone(),
1292 1,
1293 [1, 1, 1].to_vec(),
1294 1
1295 ));
1296
1297 // approve915 // approve
1298 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));916 assert_ok!(TemplateModule::approve(origin1.clone(), 2, 1, 1));
1299 assert_eq!(TemplateModule::approved(1, (1, 1))[0].approved, 2);917 assert_eq!(TemplateModule::approved(1, (1, 1))[0].approved, 2);
1335#[test]953#[test]
1336fn owner_can_add_address_to_white_list() {954fn owner_can_add_address_to_white_list() {
1337 new_test_ext().execute_with(|| {955 new_test_ext().execute_with(|| {
1338 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();956 default_limits();
1339 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();957
1340 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();958 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1341 let mode: CollectionMode = CollectionMode::NFT(2000);
1342 let origin1 = Origin::signed(1);
1343959
1344 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 960 let origin1 = Origin::signed(1);
1345 collection_numbers_limit: 10,
1346 account_token_ownership_limit: 10,
1347 collections_admins_limit: 5,
1348 custom_data_limit: 2048,
1349 nft_sponsor_transfer_timeout: 15,
1350 fungible_sponsor_transfer_timeout: 15,
1351 refungible_sponsor_transfer_timeout: 15,
1352 }));
1353
1354 assert_ok!(TemplateModule::create_collection(
1355 origin1.clone(),
1356 col_name1.clone(),
1357 col_desc1.clone(),
1358 token_prefix1.clone(),
1359 mode
1360 ));
1361
1362 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));961 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1363 assert_eq!(TemplateModule::white_list(1)[0], 2);962 assert_eq!(TemplateModule::white_list(collection_id)[0], 2);
1364 });963 });
1365}964}
1366965
1367#[test]966#[test]
1368fn admin_can_add_address_to_white_list() {967fn admin_can_add_address_to_white_list() {
1369 new_test_ext().execute_with(|| {968 new_test_ext().execute_with(|| {
1370 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();969 default_limits();
1371 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();970
1372 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();971 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1373 let mode: CollectionMode = CollectionMode::NFT(2000);
1374 let origin1 = Origin::signed(1);972 let origin1 = Origin::signed(1);
1375 let origin2 = Origin::signed(2);973 let origin2 = Origin::signed(2);
1376974
1377 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 975 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
1378 collection_numbers_limit: 10,
1379 account_token_ownership_limit: 10,
1380 collections_admins_limit: 5,
1381 custom_data_limit: 2048,
1382 nft_sponsor_transfer_timeout: 15,
1383 fungible_sponsor_transfer_timeout: 15,
1384 refungible_sponsor_transfer_timeout: 15,
1385 }));
1386
1387 assert_ok!(TemplateModule::create_collection(
1388 origin1.clone(),
1389 col_name1.clone(),
1390 col_desc1.clone(),
1391 token_prefix1.clone(),
1392 mode
1393 ));
1394
1395 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));
1396 assert_ok!(TemplateModule::add_to_white_list(origin2.clone(), 1, 3));976 assert_ok!(TemplateModule::add_to_white_list(origin2.clone(), collection_id, 3));
1397 assert_eq!(TemplateModule::white_list(1)[0], 3);977 assert_eq!(TemplateModule::white_list(collection_id)[0], 3);
1398 });978 });
1399}979}
1400980
1401#[test]981#[test]
1402fn nonprivileged_user_cannot_add_address_to_white_list() {982fn nonprivileged_user_cannot_add_address_to_white_list() {
1403 new_test_ext().execute_with(|| {983 new_test_ext().execute_with(|| {
1404 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();984 default_limits();
1405 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();985
1406 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();986 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1407 let mode: CollectionMode = CollectionMode::NFT(2000);
1408 let origin1 = Origin::signed(1);
1409 let origin2 = Origin::signed(2);
1410987
1411 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 988 let origin2 = Origin::signed(2);
1412 collection_numbers_limit: 10,
1413 account_token_ownership_limit: 10,
1414 collections_admins_limit: 5,
1415 custom_data_limit: 2048,
1416 nft_sponsor_transfer_timeout: 15,
1417 fungible_sponsor_transfer_timeout: 15,
1418 refungible_sponsor_transfer_timeout: 15,
1419 }));
1420
1421 assert_ok!(TemplateModule::create_collection(
1422 origin1.clone(),
1423 col_name1.clone(),
1424 col_desc1.clone(),
1425 token_prefix1.clone(),
1426 mode
1427 ));
1428
1429 assert_noop!(989 assert_noop!(
1430 TemplateModule::add_to_white_list(origin2.clone(), 1, 3),990 TemplateModule::add_to_white_list(origin2.clone(), collection_id, 3),
1431 "You do not have permissions to modify this collection"991 "You do not have permissions to modify this collection"
1432 );992 );
1433 });993 });
1436#[test]996#[test]
1437fn nobody_can_add_address_to_white_list_of_nonexisting_collection() {997fn nobody_can_add_address_to_white_list_of_nonexisting_collection() {
1438 new_test_ext().execute_with(|| {998 new_test_ext().execute_with(|| {
999 default_limits();
1000
1439 let origin1 = Origin::signed(1);1001 let origin1 = Origin::signed(1);
14401002
1441 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1442 collection_numbers_limit: 10,
1443 account_token_ownership_limit: 10,
1444 collections_admins_limit: 5,
1445 custom_data_limit: 2048,
1446 nft_sponsor_transfer_timeout: 15,
1447 fungible_sponsor_transfer_timeout: 15,
1448 refungible_sponsor_transfer_timeout: 15,
1449 }));
1450
1451 assert_noop!(1003 assert_noop!(
1452 TemplateModule::add_to_white_list(origin1.clone(), 1, 2),1004 TemplateModule::add_to_white_list(origin1.clone(), 1, 2),
1453 "This collection does not exist"1005 "This collection does not exist"
1458#[test]1010#[test]
1459fn nobody_can_add_address_to_white_list_of_deleted_collection() {1011fn nobody_can_add_address_to_white_list_of_deleted_collection() {
1460 new_test_ext().execute_with(|| {1012 new_test_ext().execute_with(|| {
1461 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1013 default_limits();
1462 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1014
1463 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1015 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1464 let mode: CollectionMode = CollectionMode::NFT(2000);
1465 let origin1 = Origin::signed(1);
14661016
1467 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1017 let origin1 = Origin::signed(1);
1468 collection_numbers_limit: 10,
1469 account_token_ownership_limit: 10,
1470 collections_admins_limit: 5,
1471 custom_data_limit: 2048,
1472 nft_sponsor_transfer_timeout: 15,
1473 fungible_sponsor_transfer_timeout: 15,
1474 refungible_sponsor_transfer_timeout: 15,
1475 }));
1476
1477 assert_ok!(TemplateModule::create_collection(
1478 origin1.clone(),
1479 col_name1.clone(),
1480 col_desc1.clone(),
1481 token_prefix1.clone(),
1482 mode
1483 ));
1484
1485 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), 1));1018 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), collection_id));
1486 assert_noop!(1019 assert_noop!(
1487 TemplateModule::add_to_white_list(origin1.clone(), 1, 2),1020 TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2),
1488 "This collection does not exist"1021 "This collection does not exist"
1489 );1022 );
1490 });1023 });
1494#[test]1027#[test]
1495fn address_is_already_added_to_white_list() {1028fn address_is_already_added_to_white_list() {
1496 new_test_ext().execute_with(|| {1029 new_test_ext().execute_with(|| {
1497 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1030 default_limits();
1498 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1031
1499 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1032 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1500 let mode: CollectionMode = CollectionMode::NFT(2000);
1501 let origin1 = Origin::signed(1);1033 let origin1 = Origin::signed(1);
1502
1503 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1034
1504 collection_numbers_limit: 10,1035 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1505 account_token_ownership_limit: 10,
1506 collections_admins_limit: 5,
1507 custom_data_limit: 2048,
1508 nft_sponsor_transfer_timeout: 15,
1509 fungible_sponsor_transfer_timeout: 15,
1510 refungible_sponsor_transfer_timeout: 15,
1511 }));
1512
1513 assert_ok!(TemplateModule::create_collection(
1514 origin1.clone(),
1515 col_name1.clone(),
1516 col_desc1.clone(),
1517 token_prefix1.clone(),
1518 mode
1519 ));
1520
1521 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
1522 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1036 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1523 assert_eq!(TemplateModule::white_list(1)[0], 2);1037 assert_eq!(TemplateModule::white_list(collection_id)[0], 2);
1524 assert_eq!(TemplateModule::white_list(1).len(), 1);1038 assert_eq!(TemplateModule::white_list(collection_id).len(), 1);
1525 });1039 });
1526}1040}
15271041
1528#[test]1042#[test]
1529fn owner_can_remove_address_from_white_list() {1043fn owner_can_remove_address_from_white_list() {
1530 new_test_ext().execute_with(|| {1044 new_test_ext().execute_with(|| {
1531 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1045 default_limits();
1532 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1046
1533 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1047 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1534 let mode: CollectionMode = CollectionMode::NFT(2000);
1535 let origin1 = Origin::signed(1);
15361048
1537 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1049 let origin1 = Origin::signed(1);
1538 collection_numbers_limit: 10,
1539 account_token_ownership_limit: 10,
1540 collections_admins_limit: 5,
1541 custom_data_limit: 2048,
1542 nft_sponsor_transfer_timeout: 15,
1543 fungible_sponsor_transfer_timeout: 15,
1544 refungible_sponsor_transfer_timeout: 15,
1545 }));
1546
1547 assert_ok!(TemplateModule::create_collection(
1548 origin1.clone(),
1549 col_name1.clone(),
1550 col_desc1.clone(),
1551 token_prefix1.clone(),
1552 mode
1553 ));
1554
1555 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1050 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1556 assert_ok!(TemplateModule::remove_from_white_list(1051 assert_ok!(TemplateModule::remove_from_white_list(
1557 origin1.clone(),1052 origin1.clone(),
1558 1,1053 collection_id,
1559 21054 2
1560 ));1055 ));
1561 assert_eq!(TemplateModule::white_list(1).len(), 0);1056 assert_eq!(TemplateModule::white_list(collection_id).len(), 0);
1562 });1057 });
1563}1058}
15641059
1565#[test]1060#[test]
1566fn admin_can_remove_address_from_white_list() {1061fn admin_can_remove_address_from_white_list() {
1567 new_test_ext().execute_with(|| {1062 new_test_ext().execute_with(|| {
1568 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1063 default_limits();
1569 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1064
1570 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1065 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1571 let mode: CollectionMode = CollectionMode::NFT(2000);
1572 let origin1 = Origin::signed(1);1066 let origin1 = Origin::signed(1);
1573 let origin2 = Origin::signed(2);1067 let origin2 = Origin::signed(2);
15741068
1575 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1069 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
1576 collection_numbers_limit: 10,
1577 account_token_ownership_limit: 10,
1578 collections_admins_limit: 5,
1579 custom_data_limit: 2048,
1580 nft_sponsor_transfer_timeout: 15,
1581 fungible_sponsor_transfer_timeout: 15,
1582 refungible_sponsor_transfer_timeout: 15,
1583 }));
15841070
1585 assert_ok!(TemplateModule::create_collection(1071 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 3));
1586 origin1.clone(),
1587 col_name1.clone(),
1588 col_desc1.clone(),
1589 token_prefix1.clone(),
1590 mode
1591 ));
1592
1593 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));
1594
1595 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 3));
1596 assert_ok!(TemplateModule::remove_from_white_list(1072 assert_ok!(TemplateModule::remove_from_white_list(
1597 origin2.clone(),1073 origin2.clone(),
1598 1,1074 collection_id,
1599 31075 3
1600 ));1076 ));
1601 assert_eq!(TemplateModule::white_list(1).len(), 0);1077 assert_eq!(TemplateModule::white_list(collection_id).len(), 0);
1602 });1078 });
1603}1079}
16041080
1605#[test]1081#[test]
1606fn nonprivileged_user_cannot_remove_address_from_white_list() {1082fn nonprivileged_user_cannot_remove_address_from_white_list() {
1607 new_test_ext().execute_with(|| {1083 new_test_ext().execute_with(|| {
1608 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1084 default_limits();
1609 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1085
1610 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1086 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1611 let mode: CollectionMode = CollectionMode::NFT(2000);
1612 let origin1 = Origin::signed(1);1087 let origin1 = Origin::signed(1);
1613 let origin2 = Origin::signed(2);1088 let origin2 = Origin::signed(2);
16141089
1615 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1090 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1616 collection_numbers_limit: 10,
1617 account_token_ownership_limit: 10,
1618 collections_admins_limit: 5,
1619 custom_data_limit: 2048,
1620 nft_sponsor_transfer_timeout: 15,
1621 fungible_sponsor_transfer_timeout: 15,
1622 refungible_sponsor_transfer_timeout: 15,
1623 }));
1624
1625 assert_ok!(TemplateModule::create_collection(
1626 origin1.clone(),
1627 col_name1.clone(),
1628 col_desc1.clone(),
1629 token_prefix1.clone(),
1630 mode
1631 ));
1632
1633 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
1634 assert_noop!(1091 assert_noop!(
1635 TemplateModule::remove_from_white_list(origin2.clone(), 1, 2),1092 TemplateModule::remove_from_white_list(origin2.clone(), collection_id, 2),
1636 "You do not have permissions to modify this collection"1093 "You do not have permissions to modify this collection"
1637 );1094 );
1638 assert_eq!(TemplateModule::white_list(1)[0], 2);1095 assert_eq!(TemplateModule::white_list(collection_id)[0], 2);
1639 });1096 });
1640}1097}
16411098
1642#[test]1099#[test]
1643fn nobody_can_remove_address_from_white_list_of_nonexisting_collection() {1100fn nobody_can_remove_address_from_white_list_of_nonexisting_collection() {
1644 new_test_ext().execute_with(|| {1101 new_test_ext().execute_with(|| {
1102 default_limits();
1645 let origin1 = Origin::signed(1);1103 let origin1 = Origin::signed(1);
16461104
1647 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1648 collection_numbers_limit: 10,
1649 account_token_ownership_limit: 10,
1650 collections_admins_limit: 5,
1651 custom_data_limit: 2048,
1652 nft_sponsor_transfer_timeout: 15,
1653 fungible_sponsor_transfer_timeout: 15,
1654 refungible_sponsor_transfer_timeout: 15,
1655 }));
1656
1657 assert_noop!(1105 assert_noop!(
1658 TemplateModule::remove_from_white_list(origin1.clone(), 1, 2),1106 TemplateModule::remove_from_white_list(origin1.clone(), 1, 2),
1659 "This collection does not exist"1107 "This collection does not exist"
1664#[test]1112#[test]
1665fn nobody_can_remove_address_from_white_list_of_deleted_collection() {1113fn nobody_can_remove_address_from_white_list_of_deleted_collection() {
1666 new_test_ext().execute_with(|| {1114 new_test_ext().execute_with(|| {
1667 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1115 default_limits();
1668 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1116
1669 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1117 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1670 let mode: CollectionMode = CollectionMode::NFT(2000);
1671 let origin1 = Origin::signed(1);1118 let origin1 = Origin::signed(1);
1672 let origin2 = Origin::signed(2);1119 let origin2 = Origin::signed(2);
16731120
1674 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1121 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1675 collection_numbers_limit: 10,
1676 account_token_ownership_limit: 10,
1677 collections_admins_limit: 5,
1678 custom_data_limit: 2048,
1679 nft_sponsor_transfer_timeout: 15,
1680 fungible_sponsor_transfer_timeout: 15,
1681 refungible_sponsor_transfer_timeout: 15,
1682 }));
1683
1684 assert_ok!(TemplateModule::create_collection(
1685 origin1.clone(),
1686 col_name1.clone(),
1687 col_desc1.clone(),
1688 token_prefix1.clone(),
1689 mode
1690 ));
1691
1692 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
1693 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), 1));1122 assert_ok!(TemplateModule::destroy_collection(origin1.clone(), collection_id));
1694 assert_noop!(1123 assert_noop!(
1695 TemplateModule::remove_from_white_list(origin2.clone(), 1, 2),1124 TemplateModule::remove_from_white_list(origin2.clone(), collection_id, 2),
1696 "This collection does not exist"1125 "This collection does not exist"
1697 );1126 );
1698 assert_eq!(TemplateModule::white_list(1).len(), 0);1127 assert_eq!(TemplateModule::white_list(collection_id).len(), 0);
1699 });1128 });
1700}1129}
17011130
1702// If address is already removed from white list, nothing happens1131// If address is already removed from white list, nothing happens
1703#[test]1132#[test]
1704fn address_is_already_removed_from_white_list() {1133fn address_is_already_removed_from_white_list() {
1705 new_test_ext().execute_with(|| {1134 new_test_ext().execute_with(|| {
1706 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1135 default_limits();
1707 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1136
1708 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1137 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1709 let mode: CollectionMode = CollectionMode::NFT(2000);
1710 let origin1 = Origin::signed(1);1138 let origin1 = Origin::signed(1);
17111139
1712 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1140 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
1713 collection_numbers_limit: 10,
1714 account_token_ownership_limit: 10,
1715 collections_admins_limit: 5,
1716 custom_data_limit: 2048,
1717 nft_sponsor_transfer_timeout: 15,
1718 fungible_sponsor_transfer_timeout: 15,
1719 refungible_sponsor_transfer_timeout: 15,
1720 }));
1721
1722 assert_ok!(TemplateModule::create_collection(
1723 origin1.clone(),
1724 col_name1.clone(),
1725 col_desc1.clone(),
1726 token_prefix1.clone(),
1727 mode
1728 ));
1729
1730 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));
1731 assert_ok!(TemplateModule::remove_from_white_list(1141 assert_ok!(TemplateModule::remove_from_white_list(
1732 origin1.clone(),1142 origin1.clone(),
1733 1,1143 collection_id,
1734 21144 2
1735 ));1145 ));
1736 assert_ok!(TemplateModule::remove_from_white_list(1146 assert_ok!(TemplateModule::remove_from_white_list(
1737 origin1.clone(),1147 origin1.clone(),
1738 1,1148 collection_id,
1739 21149 2
1740 ));1150 ));
1741 assert_eq!(TemplateModule::white_list(1).len(), 0);1151 assert_eq!(TemplateModule::white_list(collection_id).len(), 0);
1742 });1152 });
1743}1153}
17441154
1745// If Public Access mode is set to WhiteList, tokens can’t be transferred from a non-whitelisted address with transfer or transferFrom (2 tests)1155// If Public Access mode is set to WhiteList, tokens can’t be transferred from a non-whitelisted address with transfer or transferFrom (2 tests)
1746#[test]1156#[test]
1747fn white_list_test_1() {1157fn white_list_test_1() {
1748 new_test_ext().execute_with(|| {1158 new_test_ext().execute_with(|| {
1749 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1159 default_limits();
1750 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1160
1751 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1161 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1752 let mode: CollectionMode = CollectionMode::NFT(2000);
17531162
1754 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1755 collection_numbers_limit: 10,
1756 account_token_ownership_limit: 10,
1757 collections_admins_limit: 5,
1758 custom_data_limit: 2048,
1759 nft_sponsor_transfer_timeout: 15,
1760 fungible_sponsor_transfer_timeout: 15,
1761 refungible_sponsor_transfer_timeout: 15,
1762 }));
1763
1764 let origin1 = Origin::signed(1);1163 let origin1 = Origin::signed(1);
1765 assert_ok!(TemplateModule::create_collection(1164
1766 origin1.clone(),1165 let data = default_nft_data();
1767 col_name1.clone(),1166 create_test_item(collection_id, &data.into());
1768 col_desc1.clone(),
1769 token_prefix1.clone(),
1770 mode
1771 ));
1772 assert_eq!(TemplateModule::collection(1).owner, 1);
17731167
1774 assert_ok!(TemplateModule::create_item(
1775 origin1.clone(),
1776 1,
1777 [1, 2, 3].to_vec(),
1778 1
1779 ));
1780
1781 assert_ok!(TemplateModule::set_public_access_mode(1168 assert_ok!(TemplateModule::set_public_access_mode(
1782 origin1.clone(),1169 origin1.clone(),
1783 1,1170 collection_id,
1784 AccessMode::WhiteList1171 AccessMode::WhiteList
1785 ));1172 ));
1786 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1173 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
17871174
1788 assert_noop!(1175 assert_noop!(
1789 TemplateModule::transfer(origin1.clone(), 3, 1, 1, 1),1176 TemplateModule::transfer(origin1.clone(), 3, 1, 1, 1),
1795#[test]1182#[test]
1796fn white_list_test_2() {1183fn white_list_test_2() {
1797 new_test_ext().execute_with(|| {1184 new_test_ext().execute_with(|| {
1798 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1185 default_limits();
1799 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1186
1800 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1187 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1801 let mode: CollectionMode = CollectionMode::NFT(2000);
1802
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: 2048,
1808 nft_sponsor_transfer_timeout: 15,
1809 fungible_sponsor_transfer_timeout: 15,
1810 refungible_sponsor_transfer_timeout: 15,
1811 }));
1812
1813 let origin1 = Origin::signed(1);1188 let origin1 = Origin::signed(1);
1814 assert_ok!(TemplateModule::create_collection(1189
1815 origin1.clone(),1190 let data = default_nft_data();
1816 col_name1.clone(),1191 create_test_item(collection_id, &data.into());
1817 col_desc1.clone(),
1818 token_prefix1.clone(),
1819 mode
1820 ));
1821 assert_eq!(TemplateModule::collection(1).owner, 1);
18221192
1823 assert_ok!(TemplateModule::create_item(
1824 origin1.clone(),
1825 1,
1826 [1, 2, 3].to_vec(),
1827 1
1828 ));
1829
1830 assert_ok!(TemplateModule::set_public_access_mode(1193 assert_ok!(TemplateModule::set_public_access_mode(
1831 origin1.clone(),1194 origin1.clone(),
1832 1,1195 collection_id,
1833 AccessMode::WhiteList1196 AccessMode::WhiteList
1834 ));1197 ));
1835 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));1198 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
1856#[test]1219#[test]
1857fn white_list_test_3() {1220fn white_list_test_3() {
1858 new_test_ext().execute_with(|| {1221 new_test_ext().execute_with(|| {
1859 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1222 default_limits();
1860 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1223
1861 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1224 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1862 let mode: CollectionMode = CollectionMode::NFT(2000);
18631225
1864 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1865 collection_numbers_limit: 10,
1866 account_token_ownership_limit: 10,
1867 collections_admins_limit: 5,
1868 custom_data_limit: 2048,
1869 nft_sponsor_transfer_timeout: 15,
1870 fungible_sponsor_transfer_timeout: 15,
1871 refungible_sponsor_transfer_timeout: 15,
1872 }));
1873
1874 let origin1 = Origin::signed(1);1226 let origin1 = Origin::signed(1);
1875 assert_ok!(TemplateModule::create_collection(1227
1876 origin1.clone(),1228 let data = default_nft_data();
1877 col_name1.clone(),1229 create_test_item(collection_id, &data.into());
1878 col_desc1.clone(),
1879 token_prefix1.clone(),
1880 mode
1881 ));
1882 assert_eq!(TemplateModule::collection(1).owner, 1);
18831230
1884 assert_ok!(TemplateModule::create_item(
1885 origin1.clone(),
1886 1,
1887 [1, 2, 3].to_vec(),
1888 1
1889 ));
1890
1891 assert_ok!(TemplateModule::set_public_access_mode(1231 assert_ok!(TemplateModule::set_public_access_mode(
1892 origin1.clone(),1232 origin1.clone(),
1893 1,1233 collection_id,
1894 AccessMode::WhiteList1234 AccessMode::WhiteList
1895 ));1235 ));
1896 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));1236 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));
1905#[test]1245#[test]
1906fn white_list_test_4() {1246fn white_list_test_4() {
1907 new_test_ext().execute_with(|| {1247 new_test_ext().execute_with(|| {
1908 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1248 default_limits();
1909 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1249
1910 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1250 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1911 let mode: CollectionMode = CollectionMode::NFT(2000);
19121251
1913 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1914 collection_numbers_limit: 10,
1915 account_token_ownership_limit: 10,
1916 collections_admins_limit: 5,
1917 custom_data_limit: 2048,
1918 nft_sponsor_transfer_timeout: 15,
1919 fungible_sponsor_transfer_timeout: 15,
1920 refungible_sponsor_transfer_timeout: 15,
1921 }));
1922
1923 let origin1 = Origin::signed(1);1252 let origin1 = Origin::signed(1);
1924 assert_ok!(TemplateModule::create_collection(
1925 origin1.clone(),
1926 col_name1.clone(),
1927 col_desc1.clone(),
1928 token_prefix1.clone(),
1929 mode
1930 ));
1931 assert_eq!(TemplateModule::collection(1).owner, 1);
19321253
1933 assert_ok!(TemplateModule::create_item(1254 let data = default_nft_data();
1934 origin1.clone(),
1935 1,1255 create_test_item(collection_id, &data.into());
1936 [1, 2, 3].to_vec(),
1937 1
1938 ));
19391256
1940 assert_ok!(TemplateModule::set_public_access_mode(1257 assert_ok!(TemplateModule::set_public_access_mode(
1941 origin1.clone(),1258 origin1.clone(),
1942 1,1259 collection_id,
1943 AccessMode::WhiteList1260 AccessMode::WhiteList
1944 ));1261 ));
1945 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));1262 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 1));
1946 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1263 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
19471264
1948 // do approve1265 // do approve
1949 assert_ok!(TemplateModule::approve(origin1.clone(), 1, 1, 1));1266 assert_ok!(TemplateModule::approve(origin1.clone(), 1, 1, 1));
1950 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 1);1267 assert_eq!(TemplateModule::approved(1, (1, 1)).len(), 1);
19511268
1952 assert_ok!(TemplateModule::remove_from_white_list(1269 assert_ok!(TemplateModule::remove_from_white_list(
1953 origin1.clone(),1270 origin1.clone(),
1954 1,1271 collection_id,
1955 21272 2
1956 ));1273 ));
19571274
1966#[test]1283#[test]
1967fn white_list_test_5() {1284fn white_list_test_5() {
1968 new_test_ext().execute_with(|| {1285 new_test_ext().execute_with(|| {
1969 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1286 default_limits();
1970 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1287
1971 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1288 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1972 let mode: CollectionMode = CollectionMode::NFT(2000);
19731289
1974 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1975 collection_numbers_limit: 10,
1976 account_token_ownership_limit: 10,
1977 collections_admins_limit: 5,
1978 custom_data_limit: 2048,
1979 nft_sponsor_transfer_timeout: 15,
1980 fungible_sponsor_transfer_timeout: 15,
1981 refungible_sponsor_transfer_timeout: 15,
1982 }));
1983
1984 let origin1 = Origin::signed(1);1290 let origin1 = Origin::signed(1);
1985 assert_ok!(TemplateModule::create_collection(
1986 origin1.clone(),
1987 col_name1.clone(),
1988 col_desc1.clone(),
1989 token_prefix1.clone(),
1990 mode
1991 ));
1992 assert_eq!(TemplateModule::collection(1).owner, 1);
19931291
1994 assert_ok!(TemplateModule::create_item(1292 let data = default_nft_data();
1995 origin1.clone(),
1996 1,1293 create_test_item(collection_id, &data.into());
1997 [1, 2, 3].to_vec(),
1998 1
1999 ));
20001294
2001 assert_ok!(TemplateModule::set_public_access_mode(1295 assert_ok!(TemplateModule::set_public_access_mode(
2002 origin1.clone(),1296 origin1.clone(),
2003 1,1297 collection_id,
2004 AccessMode::WhiteList1298 AccessMode::WhiteList
2005 ));1299 ));
2006 assert_noop!(1300 assert_noop!(
2014#[test]1308#[test]
2015fn white_list_test_6() {1309fn white_list_test_6() {
2016 new_test_ext().execute_with(|| {1310 new_test_ext().execute_with(|| {
2017 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1311 default_limits();
2018 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1312
2019 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1313 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2020 let mode: CollectionMode = CollectionMode::NFT(2000);
20211314
2022 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2023 collection_numbers_limit: 10,
2024 account_token_ownership_limit: 10,
2025 collections_admins_limit: 5,
2026 custom_data_limit: 2048,
2027 nft_sponsor_transfer_timeout: 15,
2028 fungible_sponsor_transfer_timeout: 15,
2029 refungible_sponsor_transfer_timeout: 15,
2030 }));
2031
2032 let origin1 = Origin::signed(1);1315 let origin1 = Origin::signed(1);
2033 assert_ok!(TemplateModule::create_collection(
2034 origin1.clone(),
2035 col_name1.clone(),
2036 col_desc1.clone(),
2037 token_prefix1.clone(),
2038 mode
2039 ));
2040 assert_ok!(TemplateModule::set_public_access_mode(1316 assert_ok!(TemplateModule::set_public_access_mode(
2041 origin1.clone(),1317 origin1.clone(),
2042 1,1318 collection_id,
2043 AccessMode::WhiteList1319 AccessMode::WhiteList
2044 ));1320 ));
20451321
2056#[test]1332#[test]
2057fn white_list_test_7() {1333fn white_list_test_7() {
2058 new_test_ext().execute_with(|| {1334 new_test_ext().execute_with(|| {
2059 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1335 default_limits();
2060 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1336
2061 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1337 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2062 let mode: CollectionMode = CollectionMode::NFT(2000);
20631338
2064 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1339 let data = default_nft_data();
2065 collection_numbers_limit: 10,1340 create_test_item(collection_id, &data.into());
2066 account_token_ownership_limit: 10,
2067 collections_admins_limit: 5,1341
2068 custom_data_limit: 2048,
2069 nft_sponsor_transfer_timeout: 15,
2070 fungible_sponsor_transfer_timeout: 15,
2071 refungible_sponsor_transfer_timeout: 15,
2072 }));
2073
2074 let origin1 = Origin::signed(1);1342 let origin1 = Origin::signed(1);
2075 assert_ok!(TemplateModule::create_collection(
2076 origin1.clone(),
2077 col_name1.clone(),
2078 col_desc1.clone(),
2079 token_prefix1.clone(),
2080 mode
2081 ));
2082 assert_eq!(TemplateModule::collection(1).owner, 1);
20831343
2084 assert_ok!(TemplateModule::create_item(
2085 origin1.clone(),
2086 1,
2087 [1, 2, 3].to_vec(),
2088 1
2089 ));
2090
2091 assert_ok!(TemplateModule::set_public_access_mode(1344 assert_ok!(TemplateModule::set_public_access_mode(
2092 origin1.clone(),1345 origin1.clone(),
2093 1,1346 collection_id,
2094 AccessMode::WhiteList1347 AccessMode::WhiteList
2095 ));1348 ));
2096 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));1349 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 1));
2097 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1350 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
20981351
2099 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1));1352 assert_ok!(TemplateModule::transfer(origin1.clone(), 2, 1, 1, 1));
2100 });1353 });
2103#[test]1356#[test]
2104fn white_list_test_8() {1357fn white_list_test_8() {
2105 new_test_ext().execute_with(|| {1358 new_test_ext().execute_with(|| {
2106 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1359 default_limits();
2107 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1360
2108 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1361 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2109 let mode: CollectionMode = CollectionMode::NFT(2000);
21101362
2111 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1363 let data = default_nft_data();
2112 collection_numbers_limit: 10,1364 create_test_item(collection_id, &data.into());
2113 account_token_ownership_limit: 10,
2114 collections_admins_limit: 5,1365
2115 custom_data_limit: 2048,
2116 nft_sponsor_transfer_timeout: 15,
2117 fungible_sponsor_transfer_timeout: 15,
2118 refungible_sponsor_transfer_timeout: 15,
2119 }));
2120
2121 let origin1 = Origin::signed(1);1366 let origin1 = Origin::signed(1);
2122 assert_ok!(TemplateModule::create_collection(
2123 origin1.clone(),
2124 col_name1.clone(),
2125 col_desc1.clone(),
2126 token_prefix1.clone(),
2127 mode
2128 ));
2129 assert_eq!(TemplateModule::collection(1).owner, 1);
21301367
2131 assert_ok!(TemplateModule::create_item(
2132 origin1.clone(),
2133 1,
2134 [1, 2, 3].to_vec(),
2135 1
2136 ));
2137
2138 assert_ok!(TemplateModule::set_public_access_mode(1368 assert_ok!(TemplateModule::set_public_access_mode(
2139 origin1.clone(),1369 origin1.clone(),
2140 1,1370 collection_id,
2141 AccessMode::WhiteList1371 AccessMode::WhiteList
2142 ));1372 ));
2143 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 1));1373 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 1));
2144 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1374 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
21451375
2146 // do approve1376 // do approve
2147 assert_ok!(TemplateModule::approve(origin1.clone(), 1, 1, 1));1377 assert_ok!(TemplateModule::approve(origin1.clone(), 1, 1, 1));
2162#[test]1392#[test]
2163fn white_list_test_9() {1393fn white_list_test_9() {
2164 new_test_ext().execute_with(|| {1394 new_test_ext().execute_with(|| {
2165 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1395 default_limits();
2166 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1396
2167 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1397 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2168 let mode: CollectionMode = CollectionMode::NFT(2000);
2169
2170 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2171 collection_numbers_limit: 10,
2172 account_token_ownership_limit: 10,
2173 collections_admins_limit: 5,
2174 custom_data_limit: 2048,
2175 nft_sponsor_transfer_timeout: 15,
2176 fungible_sponsor_transfer_timeout: 15,
2177 refungible_sponsor_transfer_timeout: 15,
2178 }));
2179
2180 let origin1 = Origin::signed(1);1398 let origin1 = Origin::signed(1);
2181 assert_ok!(TemplateModule::create_collection(
2182 origin1.clone(),
2183 col_name1.clone(),
2184 col_desc1.clone(),
2185 token_prefix1.clone(),
2186 mode
2187 ));
21881399
2189 assert_ok!(TemplateModule::set_public_access_mode(1400 assert_ok!(TemplateModule::set_public_access_mode(
2190 origin1.clone(),1401 origin1.clone(),
2191 1,1402 collection_id,
2192 AccessMode::WhiteList1403 AccessMode::WhiteList
2193 ));1404 ));
2194 assert_ok!(TemplateModule::set_mint_permission(1405 assert_ok!(TemplateModule::set_mint_permission(
2195 origin1.clone(),1406 origin1.clone(),
2196 1,1407 collection_id,
2197 false1408 false
2198 ));1409 ));
21991410
2200 assert_ok!(TemplateModule::create_item(1411 let data = default_nft_data();
2201 origin1.clone(),
2202 1,1412 create_test_item(collection_id, &data.into());
2203 [1, 2, 3].to_vec(),
2204 1
2205 ));
2206 });1413 });
2207}1414}
22081415
2209// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by admin.1416// If Public Access mode is set to WhiteList, and Mint Permission is set to false, tokens can be created by admin.
2210#[test]1417#[test]
2211fn white_list_test_10() {1418fn white_list_test_10() {
2212 new_test_ext().execute_with(|| {1419 new_test_ext().execute_with(|| {
2213 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1420 default_limits();
2214 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1421
2215 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1422 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2216 let mode: CollectionMode = CollectionMode::NFT(2000);
22171423
2218 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2219 collection_numbers_limit: 10,
2220 account_token_ownership_limit: 10,
2221 collections_admins_limit: 5,
2222 custom_data_limit: 2048,
2223 nft_sponsor_transfer_timeout: 15,
2224 fungible_sponsor_transfer_timeout: 15,
2225 refungible_sponsor_transfer_timeout: 15,
2226 }));
2227
2228 let origin1 = Origin::signed(1);1424 let origin1 = Origin::signed(1);
2229 let origin2 = Origin::signed(2);1425 let origin2 = Origin::signed(2);
2230 assert_ok!(TemplateModule::create_collection(
2231 origin1.clone(),
2232 col_name1.clone(),
2233 col_desc1.clone(),
2234 token_prefix1.clone(),
2235 mode
2236 ));
22371426
2238 assert_ok!(TemplateModule::set_public_access_mode(1427 assert_ok!(TemplateModule::set_public_access_mode(
2239 origin1.clone(),1428 origin1.clone(),
2240 1,1429 collection_id,
2241 AccessMode::WhiteList1430 AccessMode::WhiteList
2242 ));1431 ));
2243 assert_ok!(TemplateModule::set_mint_permission(1432 assert_ok!(TemplateModule::set_mint_permission(
2244 origin1.clone(),1433 origin1.clone(),
2245 1,1434 collection_id,
2246 false1435 false
2247 ));1436 ));
22481437
2249 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));1438 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
22501439
2251 assert_ok!(TemplateModule::create_item(1440 assert_ok!(TemplateModule::create_item(
2252 origin2.clone(),1441 origin2.clone(),
2253 1,1442 collection_id,
2254 [1, 2, 3].to_vec(),1443 2,
2255 21444 default_nft_data().into()
2256 ));1445 ));
2257 });1446 });
2258}1447}
2261#[test]1450#[test]
2262fn white_list_test_11() {1451fn white_list_test_11() {
2263 new_test_ext().execute_with(|| {1452 new_test_ext().execute_with(|| {
2264 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1453 default_limits();
2265 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1454
2266 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1455 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2267 let mode: CollectionMode = CollectionMode::NFT(2000);
22681456
2269 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2270 collection_numbers_limit: 10,
2271 account_token_ownership_limit: 10,
2272 collections_admins_limit: 5,
2273 custom_data_limit: 2048,
2274 nft_sponsor_transfer_timeout: 15,
2275 fungible_sponsor_transfer_timeout: 15,
2276 refungible_sponsor_transfer_timeout: 15,
2277 }));
2278
2279 let origin1 = Origin::signed(1);1457 let origin1 = Origin::signed(1);
2280 let origin2 = Origin::signed(2);1458 let origin2 = Origin::signed(2);
2281 assert_ok!(TemplateModule::create_collection(
2282 origin1.clone(),
2283 col_name1.clone(),
2284 col_desc1.clone(),
2285 token_prefix1.clone(),
2286 mode
2287 ));
22881459
2289 assert_ok!(TemplateModule::set_public_access_mode(1460 assert_ok!(TemplateModule::set_public_access_mode(
2290 origin1.clone(),1461 origin1.clone(),
2291 1,1462 collection_id,
2292 AccessMode::WhiteList1463 AccessMode::WhiteList
2293 ));1464 ));
2294 assert_ok!(TemplateModule::set_mint_permission(1465 assert_ok!(TemplateModule::set_mint_permission(
2295 origin1.clone(),1466 origin1.clone(),
2296 1,1467 collection_id,
2297 false1468 false
2298 ));1469 ));
2299 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1470 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
23001471
2301 assert_noop!(1472 assert_noop!(
2302 TemplateModule::create_item(origin2.clone(), 1, [1, 2, 3].to_vec(), 2),1473 TemplateModule::create_item(origin2.clone(), 1, 2, default_nft_data().into()),
2303 "Collection is not in mint mode"1474 "Public minting is not allowed for this collection."
2304 );1475 );
2305 });1476 });
2306}1477}
2309#[test]1480#[test]
2310fn white_list_test_12() {1481fn white_list_test_12() {
2311 new_test_ext().execute_with(|| {1482 new_test_ext().execute_with(|| {
2312 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1483 default_limits();
2313 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1484
2314 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1485 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2315 let mode: CollectionMode = CollectionMode::NFT(2000);
23161486
2317 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2318 collection_numbers_limit: 10,
2319 account_token_ownership_limit: 10,
2320 collections_admins_limit: 5,
2321 custom_data_limit: 2048,
2322 nft_sponsor_transfer_timeout: 15,
2323 fungible_sponsor_transfer_timeout: 15,
2324 refungible_sponsor_transfer_timeout: 15,
2325 }));
2326
2327 let origin1 = Origin::signed(1);1487 let origin1 = Origin::signed(1);
2328 let origin2 = Origin::signed(2);1488 let origin2 = Origin::signed(2);
2329 assert_ok!(TemplateModule::create_collection(
2330 origin1.clone(),
2331 col_name1.clone(),
2332 col_desc1.clone(),
2333 token_prefix1.clone(),
2334 mode
2335 ));
23361489
2337 assert_ok!(TemplateModule::set_public_access_mode(1490 assert_ok!(TemplateModule::set_public_access_mode(
2338 origin1.clone(),1491 origin1.clone(),
2339 1,1492 collection_id,
2340 AccessMode::WhiteList1493 AccessMode::WhiteList
2341 ));1494 ));
2342 assert_ok!(TemplateModule::set_mint_permission(1495 assert_ok!(TemplateModule::set_mint_permission(
2343 origin1.clone(),1496 origin1.clone(),
2344 1,1497 collection_id,
2345 false1498 false
2346 ));1499 ));
23471500
2348 assert_noop!(1501 assert_noop!(
2349 TemplateModule::create_item(origin2.clone(), 1, [1, 2, 3].to_vec(), 2),1502 TemplateModule::create_item(origin2.clone(), 1, 2, default_nft_data().into()),
2350 "Collection is not in mint mode"1503 "Public minting is not allowed for this collection."
2351 );1504 );
2352 });1505 });
2353}1506}
2356#[test]1509#[test]
2357fn white_list_test_13() {1510fn white_list_test_13() {
2358 new_test_ext().execute_with(|| {1511 new_test_ext().execute_with(|| {
2359 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1512 default_limits();
2360 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1513
2361 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1514 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2362 let mode: CollectionMode = CollectionMode::NFT(2000);
23631515
2364 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2365 collection_numbers_limit: 10,
2366 account_token_ownership_limit: 10,
2367 collections_admins_limit: 5,
2368 custom_data_limit: 2048,
2369 nft_sponsor_transfer_timeout: 15,
2370 fungible_sponsor_transfer_timeout: 15,
2371 refungible_sponsor_transfer_timeout: 15,
2372 }));
2373
2374 let origin1 = Origin::signed(1);1516 let origin1 = Origin::signed(1);
2375 assert_ok!(TemplateModule::create_collection(
2376 origin1.clone(),
2377 col_name1.clone(),
2378 col_desc1.clone(),
2379 token_prefix1.clone(),
2380 mode
2381 ));
23821517
2383 assert_ok!(TemplateModule::set_public_access_mode(1518 assert_ok!(TemplateModule::set_public_access_mode(
2384 origin1.clone(),1519 origin1.clone(),
2385 1,1520 collection_id,
2386 AccessMode::WhiteList1521 AccessMode::WhiteList
2387 ));1522 ));
2388 assert_ok!(TemplateModule::set_mint_permission(1523 assert_ok!(TemplateModule::set_mint_permission(
2389 origin1.clone(),1524 origin1.clone(),
2390 1,1525 collection_id,
2391 true1526 true
2392 ));1527 ));
23931528
2394 assert_ok!(TemplateModule::create_item(1529 let data = default_nft_data();
2395 origin1.clone(),
2396 1,1530 create_test_item(collection_id, &data.into());
2397 [1, 2, 3].to_vec(),
2398 1
2399 ));
2400 });1531 });
2401}1532}
24021533
2403// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by admin.1534// If Public Access mode is set to WhiteList, and Mint Permission is set to true, tokens can be created by admin.
2404#[test]1535#[test]
2405fn white_list_test_14() {1536fn white_list_test_14() {
2406 new_test_ext().execute_with(|| {1537 new_test_ext().execute_with(|| {
2407 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1538 default_limits();
2408 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1539
2409 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1540 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2410 let mode: CollectionMode = CollectionMode::NFT(2000);
24111541
2412 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2413 collection_numbers_limit: 10,
2414 account_token_ownership_limit: 10,
2415 collections_admins_limit: 5,
2416 custom_data_limit: 2048,
2417 nft_sponsor_transfer_timeout: 15,
2418 fungible_sponsor_transfer_timeout: 15,
2419 refungible_sponsor_transfer_timeout: 15,
2420 }));
2421
2422 let origin1 = Origin::signed(1);1542 let origin1 = Origin::signed(1);
2423 let origin2 = Origin::signed(2);1543 let origin2 = Origin::signed(2);
2424 assert_ok!(TemplateModule::create_collection(
2425 origin1.clone(),
2426 col_name1.clone(),
2427 col_desc1.clone(),
2428 token_prefix1.clone(),
2429 mode
2430 ));
24311544
2432 assert_ok!(TemplateModule::set_public_access_mode(1545 assert_ok!(TemplateModule::set_public_access_mode(
2433 origin1.clone(),1546 origin1.clone(),
2434 1,1547 collection_id,
2435 AccessMode::WhiteList1548 AccessMode::WhiteList
2436 ));1549 ));
2437 assert_ok!(TemplateModule::set_mint_permission(1550 assert_ok!(TemplateModule::set_mint_permission(
2438 origin1.clone(),1551 origin1.clone(),
2439 1,1552 collection_id,
2440 true1553 true
2441 ));1554 ));
24421555
2443 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));1556 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
24441557
2445 assert_ok!(TemplateModule::create_item(1558 assert_ok!(TemplateModule::create_item(
2446 origin2.clone(),1559 origin2.clone(),
2447 1,1560 1,
2448 [1, 2, 3].to_vec(),1561 2,
2449 21562 default_nft_data().into()
2450 ));1563 ));
2451 });1564 });
2452}1565}
2455#[test]1568#[test]
2456fn white_list_test_15() {1569fn white_list_test_15() {
2457 new_test_ext().execute_with(|| {1570 new_test_ext().execute_with(|| {
2458 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1571 default_limits();
2459 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1572
2460 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1573 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2461 let mode: CollectionMode = CollectionMode::NFT(2000);
24621574
2463 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2464 collection_numbers_limit: 10,
2465 account_token_ownership_limit: 10,
2466 collections_admins_limit: 5,
2467 custom_data_limit: 2048,
2468 nft_sponsor_transfer_timeout: 15,
2469 fungible_sponsor_transfer_timeout: 15,
2470 refungible_sponsor_transfer_timeout: 15,
2471 }));
2472
2473 let origin1 = Origin::signed(1);1575 let origin1 = Origin::signed(1);
2474 let origin2 = Origin::signed(2);1576 let origin2 = Origin::signed(2);
2475 assert_ok!(TemplateModule::create_collection(
2476 origin1.clone(),
2477 col_name1.clone(),
2478 col_desc1.clone(),
2479 token_prefix1.clone(),
2480 mode
2481 ));
24821577
2483 assert_ok!(TemplateModule::set_public_access_mode(1578 assert_ok!(TemplateModule::set_public_access_mode(
2484 origin1.clone(),1579 origin1.clone(),
2485 1,1580 collection_id,
2486 AccessMode::WhiteList1581 AccessMode::WhiteList
2487 ));1582 ));
2488 assert_ok!(TemplateModule::set_mint_permission(1583 assert_ok!(TemplateModule::set_mint_permission(
2489 origin1.clone(),1584 origin1.clone(),
2490 1,1585 collection_id,
2491 true1586 true
2492 ));1587 ));
24931588
2494 assert_noop!(1589 assert_noop!(
2495 TemplateModule::create_item(origin2.clone(), 1, [1, 2, 3].to_vec(), 2),1590 TemplateModule::create_item(origin2.clone(), 1, 2, default_nft_data().into()),
2496 "Address is not in white list"1591 "Address is not in white list"
2497 );1592 );
2498 });1593 });
2502#[test]1597#[test]
2503fn white_list_test_16() {1598fn white_list_test_16() {
2504 new_test_ext().execute_with(|| {1599 new_test_ext().execute_with(|| {
2505 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1600 default_limits();
2506 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1601
2507 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1602 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2508 let mode: CollectionMode = CollectionMode::NFT(2000);
25091603
2510 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2511 collection_numbers_limit: 10,
2512 account_token_ownership_limit: 10,
2513 collections_admins_limit: 5,
2514 custom_data_limit: 2048,
2515 nft_sponsor_transfer_timeout: 15,
2516 fungible_sponsor_transfer_timeout: 15,
2517 refungible_sponsor_transfer_timeout: 15,
2518 }));
2519
2520 let origin1 = Origin::signed(1);1604 let origin1 = Origin::signed(1);
2521 let origin2 = Origin::signed(2);1605 let origin2 = Origin::signed(2);
2522 assert_ok!(TemplateModule::create_collection(
2523 origin1.clone(),
2524 col_name1.clone(),
2525 col_desc1.clone(),
2526 token_prefix1.clone(),
2527 mode
2528 ));
25291606
2530 assert_ok!(TemplateModule::set_public_access_mode(1607 assert_ok!(TemplateModule::set_public_access_mode(
2531 origin1.clone(),1608 origin1.clone(),
2532 1,1609 collection_id,
2533 AccessMode::WhiteList1610 AccessMode::WhiteList
2534 ));1611 ));
2535 assert_ok!(TemplateModule::set_mint_permission(1612 assert_ok!(TemplateModule::set_mint_permission(
2536 origin1.clone(),1613 origin1.clone(),
2537 1,1614 collection_id,
2538 true1615 true
2539 ));1616 ));
2540 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), 1, 2));1617 assert_ok!(TemplateModule::add_to_white_list(origin1.clone(), collection_id, 2));
25411618
2542 assert_ok!(TemplateModule::create_item(1619 assert_ok!(TemplateModule::create_item(
2543 origin2.clone(),1620 origin2.clone(),
2544 1,1621 1,
2545 [1, 2, 3].to_vec(),1622 2,
2546 21623 default_nft_data().into()
2547 ));1624 ));
2548 });1625 });
2549}1626}
2552#[test]1629#[test]
2553fn total_number_collections_bound() {1630fn total_number_collections_bound() {
2554 new_test_ext().execute_with(|| {1631 new_test_ext().execute_with(|| {
2555 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1632 default_limits();
2556 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1633
2557 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1634 create_test_collection(&CollectionMode::NFT, 1);
2558 let mode: CollectionMode = CollectionMode::NFT(2000);
2559
2560 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2561 collection_numbers_limit: 10,
2562 account_token_ownership_limit: 10,
2563 collections_admins_limit: 5,
2564 custom_data_limit: 2048,
2565 nft_sponsor_transfer_timeout: 15,
2566 fungible_sponsor_transfer_timeout: 15,
2567 refungible_sponsor_transfer_timeout: 15,
2568 }));
2569
2570 let origin1 = Origin::signed(1);
2571 assert_ok!(TemplateModule::create_collection(
2572 origin1.clone(),
2573 col_name1.clone(),
2574 col_desc1.clone(),
2575 token_prefix1.clone(),
2576 mode
2577 ));
2578 });1635 });
2579}1636}
25801637
2581// Total number of collections. Negotive test1638// Total number of collections. Negotive test
2582#[test]1639#[test]
2583fn total_number_collections_bound_neg() {1640fn total_number_collections_bound_neg() {
2584 new_test_ext().execute_with(|| {1641 new_test_ext().execute_with(|| {
2585 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1642 default_limits();
2586 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
2587 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
2588 let mode: CollectionMode = CollectionMode::NFT(2000);
25891643
2590 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2591 collection_numbers_limit: 10,
2592 account_token_ownership_limit: 10,
2593 collections_admins_limit: 5,
2594 custom_data_limit: 2048,
2595 nft_sponsor_transfer_timeout: 15,
2596 fungible_sponsor_transfer_timeout: 15,
2597 refungible_sponsor_transfer_timeout: 15,
2598 }));
2599
2600 let origin1 = Origin::signed(1);1644 let origin1 = Origin::signed(1);
26011645
2602 for _ in 0..10 {1646 for i in 0..default_collection_numbers_limit() {
2603
2604 assert_ok!(TemplateModule::create_collection(1647 create_test_collection(&CollectionMode::NFT, i + 1);
2605 origin1.clone(),
2606 col_name1.clone(),
2607 col_desc1.clone(),
2608 token_prefix1.clone(),
2609 mode.clone()
2610 ));
2611 }1648 }
26121649
1650 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
1651 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
1652 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
1653
2613 // 11-th collection in chain. Expects error1654 // 11-th collection in chain. Expects error
2614 assert_noop!(TemplateModule::create_collection(1655 assert_noop!(TemplateModule::create_collection(
2615 origin1.clone(),1656 origin1.clone(),
2616 col_name1.clone(),1657 col_name1.clone(),
2617 col_desc1.clone(),1658 col_desc1.clone(),
2618 token_prefix1.clone(),1659 token_prefix1.clone(),
2619 mode.clone()1660 CollectionMode::NFT
2620 ), "Total collections bound exceeded");1661 ), "Total collections bound exceeded");
2621 });1662 });
2622}1663}
2625#[test]1666#[test]
2626fn owned_tokens_bound() {1667fn owned_tokens_bound() {
2627 new_test_ext().execute_with(|| {1668 new_test_ext().execute_with(|| {
2628 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1669 default_limits();
2629 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1670
2630 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1671 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
2631 let mode: CollectionMode = CollectionMode::NFT(2000);
26321672
2633 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1673 let data = default_nft_data();
2634 collection_numbers_limit: 10,
2635 account_token_ownership_limit: 10,
2636 collections_admins_limit: 5,
2637 custom_data_limit: 2048,
2638 nft_sponsor_transfer_timeout: 15,
2639 fungible_sponsor_transfer_timeout: 15,
2640 refungible_sponsor_transfer_timeout: 15,
2641 }));
2642
2643 let origin1 = Origin::signed(1);
2644 assert_ok!(TemplateModule::create_collection(1674 create_test_item(collection_id, &data.clone().into());
2645 origin1.clone(),
2646 col_name1.clone(),
2647 col_desc1.clone(),
2648 token_prefix1.clone(),
2649 mode
2650 ));
2651
2652 assert_ok!(TemplateModule::create_item(1675 create_test_item(collection_id, &data.into());
2653 origin1.clone(),
2654 1,
2655 [1, 2, 3].to_vec(),
2656 1
2657 ));
2658
2659 assert_ok!(TemplateModule::create_item(
2660 origin1.clone(),
2661 1,
2662 [1, 2, 3].to_vec(),
2663 1
2664 ));
2665 });1676 });
2666}1677}
26671678
2668// Owned tokens by a single address. Negotive test1679// Owned tokens by a single address. Negotive test
2669#[test]1680#[test]
2670fn owned_tokens_bound_neg() {1681fn owned_tokens_bound_neg() {
2671 new_test_ext().execute_with(|| {1682 new_test_ext().execute_with(|| {
2672 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
2673 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
2674 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
2675 let mode: CollectionMode = CollectionMode::NFT(2000);
2676
2677 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1683 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2678 collection_numbers_limit: 10,1684 collection_numbers_limit: 10,
2679 account_token_ownership_limit: 1,1685 account_token_ownership_limit: 1,
2683 fungible_sponsor_transfer_timeout: 15,1689 fungible_sponsor_transfer_timeout: 15,
2684 refungible_sponsor_transfer_timeout: 15, 1690 refungible_sponsor_transfer_timeout: 15,
2685 }));1691 }));
1692
1693 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
26861694
2687 let origin1 = Origin::signed(1);1695 let origin1 = Origin::signed(1);
2688 assert_ok!(TemplateModule::create_collection(1696 let data = default_nft_data();
2689 origin1.clone(),
2690 col_name1.clone(),1697 create_test_item(collection_id, &data.clone().into());
2691 col_desc1.clone(),
2692 token_prefix1.clone(),
2693 mode
2694 ));
26951698
2696 assert_ok!(TemplateModule::create_item(
2697 origin1.clone(),
2698 1,
2699 [1, 2, 3].to_vec(),
2700 1
2701 ));
2702
2703 assert_noop!(TemplateModule::create_item(1699 assert_noop!(TemplateModule::create_item(
2704 origin1.clone(),1700 origin1.clone(),
2705 1,1701 1,
2706 [1, 2, 3].to_vec(),1702 1,
2707 11703 data.into()
2708 ), "Owned tokens by a single address bound exceeded");1704 ), "Owned tokens by a single address bound exceeded");
2709 });1705 });
2710}1706}
2713#[test]1709#[test]
2714fn collection_admins_bound() {1710fn collection_admins_bound() {
2715 new_test_ext().execute_with(|| {1711 new_test_ext().execute_with(|| {
2716 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
2717 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
2718 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
2719 let mode: CollectionMode = CollectionMode::NFT(2000);
2720
2721 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1712 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2722 collection_numbers_limit: 10,1713 collection_numbers_limit: 10,
2723 account_token_ownership_limit: 10,1714 account_token_ownership_limit: 10,
2727 fungible_sponsor_transfer_timeout: 15,1718 fungible_sponsor_transfer_timeout: 15,
2728 refungible_sponsor_transfer_timeout: 15, 1719 refungible_sponsor_transfer_timeout: 15,
2729 }));1720 }));
1721
1722 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
27301723
2731 let origin1 = Origin::signed(1);1724 let origin1 = Origin::signed(1);
2732 assert_ok!(TemplateModule::create_collection(1725
2733 origin1.clone(),
2734 col_name1.clone(),
2735 col_desc1.clone(),
2736 token_prefix1.clone(),
2737 mode
2738 ));
2739
2740 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));1726 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
2741 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 3));1727 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 3));
2742 });1728 });
2743}1729}
27441730
2745// Number of collection admins. Negotive test1731// Number of collection admins. Negotive test
2746#[test]1732#[test]
2747fn collection_admins_bound_neg() {1733fn collection_admins_bound_neg() {
2748 new_test_ext().execute_with(|| {1734 new_test_ext().execute_with(|| {
2749 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();
2750 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();
2751 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();
2752 let mode: CollectionMode = CollectionMode::NFT(2000);
2753
2754 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1735 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2755 collection_numbers_limit: 10,1736 collection_numbers_limit: 10,
2756 account_token_ownership_limit: 1,1737 account_token_ownership_limit: 1,
2760 fungible_sponsor_transfer_timeout: 15,1741 fungible_sponsor_transfer_timeout: 15,
2761 refungible_sponsor_transfer_timeout: 15, 1742 refungible_sponsor_transfer_timeout: 15,
2762 }));1743 }));
1744
1745 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
27631746
2764 let origin1 = Origin::signed(1);1747 let origin1 = Origin::signed(1);
2765 assert_ok!(TemplateModule::create_collection(
2766 origin1.clone(),
2767 col_name1.clone(),
2768 col_desc1.clone(),
2769 token_prefix1.clone(),
2770 mode
2771 ));
27721748
2773 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), 1, 2));1749 assert_ok!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 2));
2774 assert_noop!(TemplateModule::add_collection_admin(origin1.clone(), 1, 3), "Number of collection admins bound exceeded");1750 assert_noop!(TemplateModule::add_collection_admin(origin1.clone(), collection_id, 3), "Number of collection admins bound exceeded");
2775 });1751 });
2776}1752}
27771753
2778// Custom data size. Positive test1754// NFT custom data size. Negative test const_data.
2779#[test]1755#[test]
2780fn custom_data_size_bound() {1756fn custom_data_size_nft_const_data_bound_neg() {
2781 new_test_ext().execute_with(|| {1757 new_test_ext().execute_with(|| {
2782 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1758 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
1759 collection_numbers_limit: 10,
1760 account_token_ownership_limit: 10,
1761 collections_admins_limit: 5,
2783 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1762 custom_data_limit: 2,
1763 nft_sponsor_transfer_timeout: 15,
1764 fungible_sponsor_transfer_timeout: 15,
2784 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1765 refungible_sponsor_transfer_timeout: 15,
1766 }));
2785 let mode: CollectionMode = CollectionMode::NFT(2000);1767
1768 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
27861769
1770 let origin1 = Origin::signed(1);
1771 let too_big_const_data = CreateItemData::NFT(CreateNftData{
1772 const_data: vec![1, 2, 3, 4],
1773 variable_data: vec![]
1774 });
1775
1776 assert_noop!(TemplateModule::create_item(
1777 origin1.clone(),
1778 collection_id,
1779 1,
1780 too_big_const_data
1781 ), "const_data exceeded data limit.");
1782 });
1783}
1784
1785// NFT custom data size. Negative test variable_data.
1786#[test]
1787fn custom_data_size_nft_variable_data_bound_neg() {
1788 new_test_ext().execute_with(|| {
2787 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1789 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2788 collection_numbers_limit: 10,1790 collection_numbers_limit: 10,
2789 account_token_ownership_limit: 10,1791 account_token_ownership_limit: 10,
2790 collections_admins_limit: 5,1792 collections_admins_limit: 5,
2791 custom_data_limit: 2048,1793 custom_data_limit: 2,
2792 nft_sponsor_transfer_timeout: 15,1794 nft_sponsor_transfer_timeout: 15,
2793 fungible_sponsor_transfer_timeout: 15,1795 fungible_sponsor_transfer_timeout: 15,
2794 refungible_sponsor_transfer_timeout: 15, 1796 refungible_sponsor_transfer_timeout: 15,
2795 }));1797 }));
27961798
1799 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1800
2797 let origin1 = Origin::signed(1);1801 let origin1 = Origin::signed(1);
2798 assert_ok!(TemplateModule::create_collection(1802 let too_big_const_data = CreateItemData::NFT(CreateNftData{
1803 const_data: vec![],
1804 variable_data: vec![1, 2, 3, 4]
1805 });
1806
1807 assert_noop!(TemplateModule::create_item(
2799 origin1.clone(),1808 origin1.clone(),
2800 col_name1.clone(),1809 collection_id,
2801 col_desc1.clone(),1810 1,
2802 token_prefix1.clone(),1811 too_big_const_data
2803 mode1812 ), "variable_data exceeded data limit.");
2804 ));
2805 });1813 });
2806}1814}
28071815
2808// Custom data size. Negotive test1816// Re fungible custom data size. Negative test const_data.
2809#[test]1817#[test]
2810fn custom_data_size_bound_neg() {1818fn custom_data_size_re_fungible_const_data_bound_neg() {
2811 new_test_ext().execute_with(|| {1819 new_test_ext().execute_with(|| {
2812 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();1820 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2813 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();1821 collection_numbers_limit: 10,
1822 account_token_ownership_limit: 10,
1823 collections_admins_limit: 5,
2814 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();1824 custom_data_limit: 2,
1825 nft_sponsor_transfer_timeout: 15,
2815 let mode: CollectionMode = CollectionMode::NFT(2000);1826 fungible_sponsor_transfer_timeout: 15,
1827 refungible_sponsor_transfer_timeout: 15,
1828 }));
28161829
1830 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1831
1832 let origin1 = Origin::signed(1);
1833 let too_big_const_data = CreateItemData::NFT(CreateNftData{
1834 const_data: vec![1, 2, 3, 4],
1835 variable_data: vec![]
1836 });
1837
1838 assert_noop!(TemplateModule::create_item(
1839 origin1.clone(),
1840 collection_id,
1841 1,
1842 too_big_const_data
1843 ), "const_data exceeded data limit.");
1844 });
1845}
1846
1847// Re fungible custom data size. Negative test variable_data.
1848#[test]
1849fn custom_data_size_re_fungible_variable_data_bound_neg() {
1850 new_test_ext().execute_with(|| {
2817 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits { 1851 assert_ok!(TemplateModule::set_chain_limits(RawOrigin::Root.into(), ChainLimits {
2818 collection_numbers_limit: 10,1852 collection_numbers_limit: 10,
2819 account_token_ownership_limit: 10,1853 account_token_ownership_limit: 10,
2820 collections_admins_limit: 5,1854 collections_admins_limit: 5,
2821 custom_data_limit: 200,1855 custom_data_limit: 2,
2822 nft_sponsor_transfer_timeout: 15,1856 nft_sponsor_transfer_timeout: 15,
2823 fungible_sponsor_transfer_timeout: 15,1857 fungible_sponsor_transfer_timeout: 15,
2824 refungible_sponsor_transfer_timeout: 15, 1858 refungible_sponsor_transfer_timeout: 15,
2825 }));1859 }));
28261860
1861 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1862
2827 let origin1 = Origin::signed(1);1863 let origin1 = Origin::signed(1);
2828 assert_noop!(TemplateModule::create_collection(1864 let too_big_const_data = CreateItemData::NFT(CreateNftData{
1865 const_data: vec![],
1866 variable_data: vec![1, 2, 3, 4]
1867 });
1868
1869 assert_noop!(TemplateModule::create_item(
2829 origin1.clone(),1870 origin1.clone(),
2830 col_name1.clone(),1871 collection_id,
2831 col_desc1.clone(),1872 1,
2832 token_prefix1.clone(),1873 too_big_const_data
2833 mode1874 ), "variable_data exceeded data limit.");
2834 ), "Custom data size bound exceeded");
2835 });1875 });
2836}1876}
2837// #endregion1877// #endregion
28381878
1879#[test]
1880fn set_const_on_chain_schema() {
1881 new_test_ext().execute_with(|| {
1882 default_limits();
1883
1884 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1885
1886 let origin1 = Origin::signed(1);
1887 assert_ok!(TemplateModule::set_const_on_chain_schema(origin1, collection_id, b"test const on chain schema".to_vec()));
1888
1889 assert_eq!(TemplateModule::collection(collection_id).const_on_chain_schema, b"test const on chain schema".to_vec());
1890 assert_eq!(TemplateModule::collection(collection_id).variable_on_chain_schema, b"".to_vec());
1891 });
1892}
1893
1894#[test]
1895fn set_variable_on_chain_schema() {
1896 new_test_ext().execute_with(|| {
1897 default_limits();
1898
1899 let collection_id = create_test_collection(&CollectionMode::NFT, 1);
1900
1901 let origin1 = Origin::signed(1);
1902 assert_ok!(TemplateModule::set_variable_on_chain_schema(origin1, collection_id, b"test variable on chain schema".to_vec()));
1903
1904 assert_eq!(TemplateModule::collection(collection_id).const_on_chain_schema, b"".to_vec());
1905 assert_eq!(TemplateModule::collection(collection_id).variable_on_chain_schema, b"test variable on chain schema".to_vec());
1906 });
1907}
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 = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
188license = 'Unlicense'5license = 'Unlicense'
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.0.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.0.0' }
29
30# Substrate dependencies
31frame-benchmarking = { default-features = false, optional = true, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
32frame-executive = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
33frame-support = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
34frame-system = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
35frame-system-benchmarking = { default-features = false, optional = true, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
36frame-system-rpc-runtime-api = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
37pallet-aura = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
38pallet-balances = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
39pallet-contracts = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
40pallet-contracts-primitives = { default-features = false, version = '2.0.0', git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
41pallet-contracts-rpc-runtime-api = { default-features = false, version = '0.8.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
42pallet-grandpa = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
43pallet-randomness-collective-flip = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
44pallet-sudo = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
45pallet-timestamp = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
46pallet-transaction-payment = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
47pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
48sp-api = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
49sp-block-builder = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
50sp-consensus-aura = { default-features = false, version = '0.8.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
51sp-core = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
52sp-inherents = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
53sp-offchain = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
54sp-runtime = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
55sp-session = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
56sp-std = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
57sp-transaction-pool = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
58sp-version = { default-features = false, version = '2.0.0' , git = 'https://github.com/usetech-llc/substrate.git', branch = 'v2.0.0_release' }
19459
195[features]60[features]
196default = ['std']61default = ['std']
62runtime-benchmarks = [
63 'hex-literal',
64 'frame-benchmarking',
65 'frame-support/runtime-benchmarks',
66 'frame-system-benchmarking',
67 'frame-system/runtime-benchmarks',
68 'pallet-balances/runtime-benchmarks',
69 'pallet-timestamp/runtime-benchmarks',
70 'pallet-nft/runtime-benchmarks',
71 'sp-runtime/runtime-benchmarks',
72]
197std = [73std = [
198 'aura/std',74 'codec/std',
75 'serde',
76 'frame-executive/std',
77 'frame-support/std',
199 'balances/std',78 'frame-system/std',
79 'frame-system-rpc-runtime-api/std',
200 'codec/std',80 'pallet-aura/std',
81 'pallet-balances/std',
201 'contracts/std',82 'pallet-contracts/std',
202 'contracts-primitives/std',83 'pallet-contracts-primitives/std',
203 'contracts-rpc-runtime-api/std',84 'pallet-contracts-rpc-runtime-api/std',
85 'pallet-grandpa/std',
204 'frame-executive/std',86 'pallet-randomness-collective-flip/std',
205 'frame-support/std',87 'pallet-sudo/std',
88 'pallet-timestamp/std',
206 'grandpa/std',89 'pallet-transaction-payment/std',
207 'randomness-collective-flip/std',90 'pallet-transaction-payment-rpc-runtime-api/std',
208 'serde',91 'pallet-nft/std',
209 'sp-api/std',92 'sp-api/std',
210 'sp-block-builder/std',93 'sp-block-builder/std',
211 'sp-consensus-aura/std',94 'sp-consensus-aura/std',
212 'sp-core/std',95 'sp-core/std',
213 'sp-inherents/std',96 'sp-inherents/std',
214 'sp-io/std',
215 'sp-offchain/std',97 'sp-offchain/std',
216 'sp-runtime/std',98 'sp-runtime/std',
217 'sp-session/std',99 'sp-session/std',
218 'sp-std/std',100 'sp-std/std',
219 'sp-transaction-pool/std',101 'sp-transaction-pool/std',
220 'sp-version/std',102 'sp-version/std',
221 'sudo/std',
222 'system/std',
223 'timestamp/std',
224 'transaction-payment/std',
225 'nft/std',
226]103]
227104
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()
modifiedruntime/src/lib.rsdiffbeforeafterboth
8#[cfg(feature = "std")]8#[cfg(feature = "std")]
9include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));9include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
1010
11use contracts_rpc_runtime_api::ContractExecResult;11use pallet_contracts_rpc_runtime_api::ContractExecResult;
12use grandpa::fg_primitives;12use pallet_grandpa::fg_primitives;
13use grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList};13use pallet_grandpa::{AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList};
14use sp_api::impl_runtime_apis;14use sp_api::impl_runtime_apis;
15use sp_consensus_aura::sr25519::AuthorityId as AuraId;15use sp_consensus_aura::sr25519::AuthorityId as AuraId;
16use sp_core::{crypto::KeyTypeId, OpaqueMetadata};16use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
29use sp_version::RuntimeVersion;29use sp_version::RuntimeVersion;
3030
31// A few exports that help ease life for downstream crates.31// A few exports that help ease life for downstream crates.
32pub use balances::Call as BalancesCall;32pub use pallet_balances::Call as BalancesCall;
33pub use contracts::Schedule as ContractsSchedule;33pub use pallet_contracts::Schedule as ContractsSchedule;
34pub use frame_support::{34pub use frame_support::{
35 construct_runtime,35 construct_runtime,
36 dispatch::DispatchResult,36 dispatch::DispatchResult,
49#[cfg(any(feature = "std", test))]49#[cfg(any(feature = "std", test))]
50pub use sp_runtime::BuildStorage;50pub use sp_runtime::BuildStorage;
51use sp_runtime::Perbill;51use sp_runtime::Perbill;
52use system::{self as system};52use frame_system::{self as system};
5353
54pub use timestamp::Call as TimestampCall;54pub use pallet_timestamp::Call as TimestampCall;
5555
56/// Re-export a nft pallet56/// Re-export a nft pallet
57/// TODO: Check this re-export. Is this safe and good style?57/// TODO: Check this re-export. Is this safe and good style?
58extern crate nft;58extern crate pallet_nft;
59pub use nft::*;59pub use pallet_nft::*;
6060
61/// An index to a block.61/// An index to a block.
62pub type BlockNumber = u32;62pub type BlockNumber = u32;
84/// Digest item type.84/// Digest item type.
85pub type DigestItem = generic::DigestItem<Hash>;85pub type DigestItem = generic::DigestItem<Hash>;
86
87mod nft_weights;
8688
87/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know89/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
88/// the specifics of the runtime. They can then be made to be agnostic over specific formats90/// the specifics of the runtime. They can then be made to be agnostic over specific formats
194 type AvailableBlockRatio = AvailableBlockRatio;196 type AvailableBlockRatio = AvailableBlockRatio;
195 /// Version of the runtime.197 /// Version of the runtime.
196 type Version = Version;198 type Version = Version;
197 /// Converts a module to the index of the module in `construct_runtime!`.
198 /// This type is being generated by `construct_runtime!`.199 /// This type is being generated by `construct_runtime!`.
199 type ModuleToIndex = ModuleToIndex;200 type PalletInfo = PalletInfo;
200 /// What to do if a new account is created.201 /// What to do if a new account is created.
201 type OnNewAccount = ();202 type OnNewAccount = ();
202 /// What to do if an account is fully reaped from the system.203 /// What to do if an account is fully reaped from the system.
203 type OnKilledAccount = ();204 type OnKilledAccount = ();
204 /// The data to be stored in an account.205 /// The data to be stored in an account.
205 type AccountData = balances::AccountData<Balance>;206 type AccountData = pallet_balances::AccountData<Balance>;
207 /// Weight information for the extrinsics of this pallet.
208 type SystemWeightInfo = ();
206}209}
207210
208impl aura::Trait for Runtime {211impl pallet_aura::Trait for Runtime {
209 type AuthorityId = AuraId;212 type AuthorityId = AuraId;
210}213}
211214
212impl grandpa::Trait for Runtime {215impl pallet_grandpa::Trait for Runtime {
213 type Event = Event;216 type Event = Event;
214 type Call = Call;217 type Call = Call;
215218
225228
226 type HandleEquivocation = ();229 type HandleEquivocation = ();
230
231 type WeightInfo = ();
227}232}
228233
229parameter_types! {234parameter_types! {
230 pub const MinimumPeriod: u64 = SLOT_DURATION / 2;235 pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
231}236}
232237
233impl timestamp::Trait for Runtime {238impl pallet_timestamp::Trait for Runtime {
234 /// A timestamp: milliseconds since the unix epoch.239 /// A timestamp: milliseconds since the unix epoch.
235 type Moment = u64;240 type Moment = u64;
236 type OnTimestampSet = Aura;241 type OnTimestampSet = Aura;
237 type MinimumPeriod = MinimumPeriod;242 type MinimumPeriod = MinimumPeriod;
243 type WeightInfo = ();
238}244}
239245
240parameter_types! {246parameter_types! {
241 // pub const ExistentialDeposit: u128 = 500;247 // pub const ExistentialDeposit: u128 = 500;
242 pub const ExistentialDeposit: u128 = 0;248 pub const ExistentialDeposit: u128 = 0;
249 pub const MaxLocks: u32 = 50;
243}250}
244251
245impl balances::Trait for Runtime {252impl pallet_balances::Trait for Runtime {
253 type MaxLocks = MaxLocks;
246 /// The type for recording an account's balance.254 /// The type for recording an account's balance.
247 type Balance = Balance;255 type Balance = Balance;
248 /// The ubiquitous event type.256 /// The ubiquitous event type.
249 type Event = Event;257 type Event = Event;
250 type DustRemoval = ();258 type DustRemoval = ();
251 type ExistentialDeposit = ExistentialDeposit;259 type ExistentialDeposit = ExistentialDeposit;
252 type AccountStore = System;260 type AccountStore = System;
261 type WeightInfo = ();
253}262}
254263
255pub const MILLICENTS: Balance = 1_000_000_000;264pub const MILLICENTS: Balance = 1_000_000_000;
263 pub const SurchargeReward: Balance = 150 * MILLICENTS;272 pub const SurchargeReward: Balance = 150 * MILLICENTS;
264}273}
265274
266impl contracts::Trait for Runtime {275impl pallet_contracts::Trait for Runtime {
267 type Call = Call;
268 type Time = Timestamp;276 type Time = Timestamp;
269 type Randomness = RandomnessCollectiveFlip;277 type Randomness = RandomnessCollectiveFlip;
270 type Currency = Balances;278 type Currency = Balances;
271 type Event = Event;279 type Event = Event;
272 type DetermineContractAddress = contracts::SimpleAddressDeterminer<Runtime>;280 type DetermineContractAddress = pallet_contracts::SimpleAddressDeterminer<Runtime>;
273 type TrieIdGenerator = contracts::TrieIdFromParentCounter<Runtime>;281 type TrieIdGenerator = pallet_contracts::TrieIdFromParentCounter<Runtime>;
274 type RentPayment = ();282 type RentPayment = ();
275 type SignedClaimHandicap = contracts::DefaultSignedClaimHandicap;283 type SignedClaimHandicap = pallet_contracts::DefaultSignedClaimHandicap;
276 type TombstoneDeposit = TombstoneDeposit;284 type TombstoneDeposit = TombstoneDeposit;
277 type StorageSizeOffset = contracts::DefaultStorageSizeOffset;285 type StorageSizeOffset = pallet_contracts::DefaultStorageSizeOffset;
278 type RentByteFee = RentByteFee;286 type RentByteFee = RentByteFee;
279 type RentDepositOffset = RentDepositOffset;287 type RentDepositOffset = RentDepositOffset;
280 type SurchargeReward = SurchargeReward;288 type SurchargeReward = SurchargeReward;
281 type MaxDepth = contracts::DefaultMaxDepth;289 type MaxDepth = pallet_contracts::DefaultMaxDepth;
282 type MaxValueSize = contracts::DefaultMaxValueSize;290 type MaxValueSize = pallet_contracts::DefaultMaxValueSize;
283 type WeightPrice = transaction_payment::Module<Self>;291 type WeightPrice = pallet_transaction_payment::Module<Self>;
284}292}
285293
286parameter_types! {294parameter_types! {
287 pub const TransactionByteFee: Balance = 1;295 pub const TransactionByteFee: Balance = 10 * MILLICENTS;
288}296}
289297
290impl transaction_payment::Trait for Runtime {298impl pallet_transaction_payment::Trait for Runtime {
291 type Currency = balances::Module<Runtime>;299 type Currency = pallet_balances::Module<Runtime>;
292 type OnTransactionPayment = ();300 type OnTransactionPayment = ();
293 type TransactionByteFee = TransactionByteFee;301 type TransactionByteFee = TransactionByteFee;
294 type WeightToFee = IdentityFee<Balance>;302 type WeightToFee = IdentityFee<Balance>;
295 type FeeMultiplierUpdate = ();303 type FeeMultiplierUpdate = ();
296}304}
297305
298impl sudo::Trait for Runtime {306impl pallet_sudo::Trait for Runtime {
299 type Event = Event;307 type Event = Event;
300 type Call = Call;308 type Call = Call;
301}309}
302310
303/// Used for the module nft in `./nft.rs`311/// Used for the module nft in `./nft.rs`
304impl nft::Trait for Runtime {312impl pallet_nft::Trait for Runtime {
305 type Event = Event;313 type Event = Event;
314 type WeightInfo = nft_weights::WeightInfo;
306}315}
307316
308construct_runtime!(317construct_runtime!(
312 UncheckedExtrinsic = UncheckedExtrinsic321 UncheckedExtrinsic = UncheckedExtrinsic
313 {322 {
314 System: system::{Module, Call, Config, Storage, Event<T>},323 System: system::{Module, Call, Config, Storage, Event<T>},
315 RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},324 RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
316 Contracts: contracts::{Module, Call, Config, Storage, Event<T>},325 Contracts: pallet_contracts::{Module, Call, Config, Storage, Event<T>},
317 Timestamp: timestamp::{Module, Call, Storage, Inherent},326 Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
318 Aura: aura::{Module, Config<T>, Inherent(Timestamp)},327 Aura: pallet_aura::{Module, Config<T>, Inherent},
319 Grandpa: grandpa::{Module, Call, Storage, Config, Event},328 Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
320 Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},329 Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
321 TransactionPayment: transaction_payment::{Module, Storage},330 TransactionPayment: pallet_transaction_payment::{Module, Storage},
322 Sudo: sudo::{Module, Call, Config<T>, Storage, Event<T>},331 Sudo: pallet_sudo::{Module, Call, Config<T>, Storage, Event<T>},
323 Nft: nft::{Module, Call, Config<T>, Storage, Event<T>},332 Nft: pallet_nft::{Module, Call, Config<T>, Storage, Event<T>},
324 }333 }
325);334);
326335
342 system::CheckEra<Runtime>,351 system::CheckEra<Runtime>,
343 system::CheckNonce<Runtime>,352 system::CheckNonce<Runtime>,
344 system::CheckWeight<Runtime>,353 system::CheckWeight<Runtime>,
345 nft::ChargeTransactionPayment<Runtime>,354 pallet_nft::ChargeTransactionPayment<Runtime>,
346);355);
347/// Unchecked extrinsic type as expected by this runtime.356/// Unchecked extrinsic type as expected by this runtime.
348pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;357pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;
354363
355impl_runtime_apis! {364impl_runtime_apis! {
356365
357 impl contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber>366 impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber>
358 for Runtime367 for Runtime
359 {368 {
360 fn call(369 fn call(
364 gas_limit: u64,373 gas_limit: u64,
365 input_data: Vec<u8>,374 input_data: Vec<u8>,
366 ) -> ContractExecResult {375 ) -> ContractExecResult {
367 let exec_result =376 let (exec_result, gas_consumed) =
368 Contracts::bare_call(origin, dest.into(), value, gas_limit, input_data);377 Contracts::bare_call(origin, dest.into(), value, gas_limit, input_data);
369 match exec_result {378 match exec_result {
370 Ok(v) => ContractExecResult::Success {379 Ok(v) => ContractExecResult::Success {
371 status: v.status,380 flags: v.flags.bits(),
372 data: v.data,381 data: v.data,
382 gas_consumed: gas_consumed,
373 },383 },
374 Err(_) => ContractExecResult::Error,384 Err(_) => ContractExecResult::Error,
375 }385 }
378 fn get_storage(388 fn get_storage(
379 address: AccountId,389 address: AccountId,
380 key: [u8; 32],390 key: [u8; 32],
381 ) -> contracts_primitives::GetStorageResult {391 ) -> pallet_contracts_primitives::GetStorageResult {
382 Contracts::get_storage(address, key)392 Contracts::get_storage(address, key)
383 }393 }
384394
385 fn rent_projection(395 fn rent_projection(
386 address: AccountId,396 address: AccountId,
387 ) -> contracts_primitives::RentProjectionResult<BlockNumber> {397 ) -> pallet_contracts_primitives::RentProjectionResult<BlockNumber> {
388 Contracts::rent_projection(address)398 Contracts::rent_projection(address)
389 }399 }
390 }400 }
476 Grandpa::grandpa_authorities()486 Grandpa::grandpa_authorities()
477 }487 }
478488
479 fn submit_report_equivocation_extrinsic(489 fn submit_report_equivocation_unsigned_extrinsic(
480 _equivocation_proof: fg_primitives::EquivocationProof<490 _equivocation_proof: fg_primitives::EquivocationProof<
481 <Block as BlockT>::Hash,491 <Block as BlockT>::Hash,
482 NumberFor<Block>,492 NumberFor<Block>,
497 }507 }
498 }508 }
509
510 impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
511 fn account_nonce(account: AccountId) -> Index {
512 System::account_nonce(account)
513 }
514 }
515
516 impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
517 fn query_info(
518 uxt: <Block as BlockT>::Extrinsic,
519 len: u32,
520 ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
521 TransactionPayment::query_info(uxt, len)
522 }
523 }
524
525 #[cfg(feature = "runtime-benchmarks")]
526 impl frame_benchmarking::Benchmark<Block> for Runtime {
527 fn dispatch_benchmark(
528 config: frame_benchmarking::BenchmarkConfig
529 ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
530 use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey};
531
532 let whitelist: Vec<TrackedStorageKey> = vec![
533 // Alice account
534 hex_literal::hex!("d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d").to_vec().into(),
535 // // Total Issuance
536 // hex_literal::hex!("c2261276cc9d1f8598ea4b6a74b15c2f57c875e4cff74148e4628f264b974c80").to_vec().into(),
537 // // Execution Phase
538 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7ff553b5a9862a516939d82b3d3d8661a").to_vec().into(),
539 // // Event Count
540 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850").to_vec().into(),
541 // // System Events
542 // hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(),
543 ];
544
545 let mut batches = Vec::<BenchmarkBatch>::new();
546 let params = (&config, &whitelist);
547
548 add_benchmark!(params, batches, pallet_nft, Nft);
549
550 if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
551 Ok(batches)
552 }
553 }
499}554}
500555
addedruntime/src/nft_weights.rsdiffbeforeafterboth

no changes

modifiedtests/flipper-src/.gitignorediffbeforeafterboth
66
7# Remove Cargo.lock when creating an executable, leave it for libraries7# Remove Cargo.lock when creating an executable, leave it for libraries
8# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock8# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock
9Cargo.lock9Cargo.lock
10
deletedtests/flipper-src/.ink/abi_gen/Cargo.tomldiffbeforeafterboth

no changes

deletedtests/flipper-src/.ink/abi_gen/main.rsdiffbeforeafterboth

no changes

modifiedtests/flipper-src/Cargo.tomldiffbeforeafterboth
1[package]1[package]
2name = "flipper"2name = "flipper"
3version = "0.1.0"3version = "3.0.0-rc1"
4authors = ["[your_name] <[your_email]>"]4authors = ["Parity Technologies <admin@parity.io>"]
5edition = "2018"5edition = "2018"
66
7[dependencies]7[dependencies]
8ink_primitives = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }
8ink_abi = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_abi", default-features = false, features = ["derive"], optional = true }9ink_metadata = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false, features = ["derive"], optional = true }
9ink_primitives = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_primitives", default-features = false }10ink_env = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }
10ink_core = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_core", default-features = false }11ink_storage = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }
11ink_lang = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_lang", default-features = false }12ink_lang = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }
1213
13scale = { package = "parity-scale-codec", version = "1.2", default-features = false, features = ["derive"] }14scale = { package = "parity-scale-codec", version = "1.3", default-features = false, features = ["derive"] }
1415scale-info = { version = "0.4", default-features = false, features = ["derive"], optional = true }
15[dependencies.type-metadata]
16git = "https://github.com/type-metadata/type-metadata.git"
17rev = "02eae9f35c40c943b56af5b60616219f2b72b47d"
18default-features = false
19features = ["derive"]
20optional = true
2116
22[lib]17[lib]
23name = "flipper"18name = "flipper"
24path = "lib.rs"19path = "lib.rs"
25crate-type = [20crate-type = ["cdylib"]
26 # Used for normal contract Wasm blobs.
27 "cdylib",
28 # Required for ABI generation, and using this contract as a dependency.
29 # If using `cargo contract build`, it will be automatically disabled to produce a smaller Wasm binary
30 "rlib",
31]
3221
33[features]22[features]
34default = ["test-env"]23default = ["std"]
35std = [24std = [
25 "ink_primitives/std",
26 "ink_metadata",
27 "ink_metadata/std",
36 "ink_abi/std",28 "ink_env/std",
37 "ink_core/std",29 "ink_storage/std",
38 "ink_primitives/std",30 "ink_lang/std",
39 "scale/std",31 "scale/std",
32 "scale-info",
40 "type-metadata/std",33 "scale-info/std",
41]34]
42test-env = [
43 "std",
44 "ink_lang/test-env",
45]
46ink-generate-abi = [
47 "std",
48 "ink_abi",
49 "type-metadata",
50 "ink_core/ink-generate-abi",
51 "ink_lang/ink-generate-abi",
52]
53ink-as-dependency = []35ink-as-dependency = []
54
55[profile.release]
56panic = "abort"
57lto = true
58opt-level = "z"
59overflow-checks = true
60
61[workspace]
62members = [
63 ".ink/abi_gen"
64]
65exclude = [
66 ".ink"
67]
68
modifiedtests/flipper-src/build.shdiffbeforeafterboth
1rustup component add rust-src --toolchain nightly
1cargo +nightly contract build2cargo +nightly contract build
2cargo +nightly contract generate-metadata3cargo +nightly contract generate-metadata
34
modifiedtests/flipper-src/lib.rsdiffbeforeafterboth
1// Copyright 2018-2020 Parity Technologies (UK) Ltd.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
1#![cfg_attr(not(feature = "std"), no_std)]15#![cfg_attr(not(feature = "std"), no_std)]
216
3use ink_lang as ink;17use ink_lang as ink;
418
5#[ink::contract(version = "0.1.0")]19#[ink::contract]
6mod flipper {20pub mod flipper {
7 use ink_core::storage;
8
9 /// Defines the storage of your contract.
10 /// Add new fields to the below struct in order
11 /// to add new static storage fields to your contract.
12 #[ink(storage)]21 #[ink(storage)]
13 struct Flipper {22 pub struct Flipper {
14 /// Stores a single `bool` value on the storage.
15 value: storage::Value<bool>,23 value: bool,
16 }24 }
1725
18 impl Flipper {26 impl Flipper {
19 /// Constructor that initializes the `bool` value to the given `init_value`.27 /// Creates a new flipper smart contract initialized with the given value.
20 #[ink(constructor)]28 #[ink(constructor)]
21 fn new(&mut self, init_value: bool) {29 pub fn new(init_value: bool) -> Self {
22 self.value.set(init_value);30 Self { value: init_value }
23 }31 }
2432
25 /// Constructor that initializes the `bool` value to `false`.33 /// Creates a new flipper smart contract initialized to `false`.
26 ///
27 /// Constructors can delegate to other constructors.
28 #[ink(constructor)]34 #[ink(constructor)]
29 fn default(&mut self) {35 pub fn default() -> Self {
30 self.new(false)36 Self::new(Default::default())
31 }37 }
3238
33 /// A message that can be called on instantiated contracts.39 /// Flips the current value of the Flipper's bool.
34 /// This one flips the value of the stored `bool` from `true`
35 /// to `false` and vice versa.
36 #[ink(message)]40 #[ink(message)]
37 fn flip(&mut self) {41 pub fn flip(&mut self) {
38 *self.value = !self.get();42 self.value = !self.value;
39 }43 }
4044
41 /// Simply returns the current value of our `bool`.45 /// Returns the current value of the Flipper's bool.
42 #[ink(message)]46 #[ink(message)]
43 fn get(&self) -> bool {47 pub fn get(&self) -> bool {
44 *self.value48 self.value
45 }49 }
46 }50 }
4751
48 /// Unit tests in Rust are normally defined within such a `#[cfg(test)]`
49 /// module and test functions are marked with a `#[test]` attribute.
50 /// The below code is technically just normal Rust code.
51 #[cfg(test)]52 #[cfg(test)]
52 mod tests {53 mod tests {
53 /// Imports all the definitions from the outer scope so we can use them here.
54 use super::*;54 use super::*;
5555
56 /// We test if the default constructor does its job.
57 #[test]56 #[test]
58 fn default_works() {57 fn default_works() {
59 // Note that even though we defined our `#[ink(constructor)]`
60 // above as `&mut self` functions that return nothing we can call
61 // them in test code as if they were normal Rust constructors
62 // that take no `self` argument but return `Self`.
63 let flipper = Flipper::default();58 let flipper = Flipper::default();
64 assert_eq!(flipper.get(), false);59 assert_eq!(flipper.get(), false);
65 }60 }
6661
67 /// We test a simple use case of our contract.
68 #[test]62 #[test]
69 fn it_works() {63 fn it_works() {
70 let mut flipper = Flipper::new(false);64 let mut flipper = Flipper::new(false);
modifiedtests/package-lock.jsondiffbeforeafterboth
3916 }3916 }
3917 },3917 },
3918 "@polkadot/api": {3918 "@polkadot/api": {
3919 "version": "1.34.1",3919 "version": "2.3.1",
3920 "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-1.34.1.tgz",3920 "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-2.3.1.tgz",
3921 "integrity": "sha512-3gCibNRchH+XbEdULS1bwiV1RgarZW1PDw1Y1mAQBVqPrUpkYqntp1D52SQOpAbRzldkwk296Sj+mx9/IeDRXA==",3921 "integrity": "sha512-B9ZOb1PiPaAlke4wQHoivVQ5ZCQWn5bgLjhVIGdcEZ4WjIcxApmzTV4ruSfqVoRKpRiVOyV3Dx/VUQDD/WgBFw==",
3922 "requires": {3922 "requires": {
3923 "@babel/runtime": "^7.11.2",3923 "@babel/runtime": "^7.12.1",
3924 "@polkadot/api-derive": "1.34.1",3924 "@polkadot/api-derive": "2.3.1",
3925 "@polkadot/keyring": "^3.4.1",3925 "@polkadot/keyring": "^3.6.1",
3926 "@polkadot/metadata": "1.34.1",3926 "@polkadot/metadata": "2.3.1",
3927 "@polkadot/rpc-core": "1.34.1",3927 "@polkadot/rpc-core": "2.3.1",
3928 "@polkadot/rpc-provider": "1.34.1",3928 "@polkadot/rpc-provider": "2.3.1",
3929 "@polkadot/types": "1.34.1",3929 "@polkadot/types": "2.3.1",
3930 "@polkadot/types-known": "1.34.1",3930 "@polkadot/types-known": "2.3.1",
3931 "@polkadot/util": "^3.4.1",3931 "@polkadot/util": "^3.6.1",
3932 "@polkadot/util-crypto": "^3.4.1",3932 "@polkadot/util-crypto": "^3.6.1",
3933 "bn.js": "^5.1.3",3933 "bn.js": "^5.1.3",
3934 "eventemitter3": "^4.0.7",3934 "eventemitter3": "^4.0.7",
3935 "rxjs": "^6.6.3"3935 "rxjs": "^6.6.3"
3936 },3936 },
3937 "dependencies": {3937 "dependencies": {
3938 "@polkadot/metadata": {3938 "@babel/runtime": {
3939 "version": "1.34.1",3939 "version": "7.12.1",
3940 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",3940 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
3941 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",3941 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
3942 "requires": {3942 "requires": {
3943 "@babel/runtime": "^7.11.2",3943 "regenerator-runtime": "^0.13.4"
3944 "@polkadot/types": "1.34.1",
3945 "@polkadot/types-known": "1.34.1",
3946 "@polkadot/util": "^3.4.1",
3947 "@polkadot/util-crypto": "^3.4.1",
3948 "bn.js": "^5.1.3"
3949 }3944 }
3950 },3945 },
3951 "@polkadot/types": {3946 "@polkadot/util": {
3952 "version": "1.34.1",3947 "version": "3.6.1",
3953 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",3948 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
3954 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",3949 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
3955 "requires": {3950 "requires": {
3956 "@babel/runtime": "^7.11.2",3951 "@babel/runtime": "^7.12.1",
3957 "@polkadot/metadata": "1.34.1",
3958 "@polkadot/util": "^3.4.1",3952 "@polkadot/x-textdecoder": "^0.3.3",
3959 "@polkadot/util-crypto": "^3.4.1",3953 "@polkadot/x-textencoder": "^0.3.3",
3960 "@types/bn.js": "^4.11.6",3954 "@types/bn.js": "^4.11.6",
3961 "bn.js": "^5.1.3",3955 "bn.js": "^5.1.3",
3962 "memoizee": "^0.4.14",3956 "camelcase": "^5.3.1",
3957 "chalk": "^4.1.0",
3963 "rxjs": "^6.6.3"3958 "ip-regex": "^4.2.0"
3964 }3959 }
3965 },3960 },
3966 "@polkadot/types-known": {
3967 "version": "1.34.1",
3968 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",
3969 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",
3970 "requires": {
3971 "@babel/runtime": "^7.11.2",
3972 "@polkadot/types": "1.34.1",
3973 "@polkadot/util": "^3.4.1",
3974 "bn.js": "^5.1.3"
3975 }
3976 },
3977 "@polkadot/util": {3961 "ip-regex": {
3978 "version": "3.4.1",3962 "version": "4.2.0",
3979 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",3963 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
3980 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",3964 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
3981 "requires": {
3982 "@babel/runtime": "^7.11.2",
3983 "@types/bn.js": "^4.11.6",
3984 "bn.js": "^5.1.3",
3985 "camelcase": "^5.3.1",
3986 "chalk": "^4.1.0",
3987 "ip-regex": "^4.1.0"
3988 }
3989 }3965 }
3990 }3966 }
3991 },3967 },
3992 "@polkadot/api-contract": {3968 "@polkadot/api-contract": {
3993 "version": "1.34.1",3969 "version": "2.3.1",
3994 "resolved": "https://registry.npmjs.org/@polkadot/api-contract/-/api-contract-1.34.1.tgz",3970 "resolved": "https://registry.npmjs.org/@polkadot/api-contract/-/api-contract-2.3.1.tgz",
3995 "integrity": "sha512-oXh7An6E9wdbczXQhw+TfIkoKLQr4t0j3OwxubrhS5Qn6f99xGoAkk0BIKjsHPGIbMHEJoywmmLrDUAeTxExgg==",3971 "integrity": "sha512-hqRU2mGkHK84dtqZSX71tFCuBmBiV/6H7pJwj5E7UPcd124LM2ETXYJ9T0ElxbAHmZQD7yv+2ZM/ncvGC/A68Q==",
3996 "requires": {3972 "requires": {
3997 "@babel/runtime": "^7.11.2",3973 "@babel/runtime": "^7.12.1",
3998 "@polkadot/api": "1.34.1",3974 "@polkadot/api": "2.3.1",
3999 "@polkadot/rpc-core": "1.34.1",3975 "@polkadot/rpc-core": "2.3.1",
4000 "@polkadot/types": "1.34.1",3976 "@polkadot/types": "2.3.1",
4001 "@polkadot/util": "^3.4.1",3977 "@polkadot/util": "^3.6.1",
4002 "bn.js": "^5.1.3",3978 "bn.js": "^5.1.3",
4003 "rxjs": "^6.6.3"3979 "rxjs": "^6.6.3"
4004 },3980 },
4005 "dependencies": {3981 "dependencies": {
4006 "@polkadot/api": {
4007 "version": "1.34.1",
4008 "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-1.34.1.tgz",
4009 "integrity": "sha512-3gCibNRchH+XbEdULS1bwiV1RgarZW1PDw1Y1mAQBVqPrUpkYqntp1D52SQOpAbRzldkwk296Sj+mx9/IeDRXA==",
4010 "requires": {
4011 "@babel/runtime": "^7.11.2",
4012 "@polkadot/api-derive": "1.34.1",
4013 "@polkadot/keyring": "^3.4.1",
4014 "@polkadot/metadata": "1.34.1",
4015 "@polkadot/rpc-core": "1.34.1",
4016 "@polkadot/rpc-provider": "1.34.1",
4017 "@polkadot/types": "1.34.1",
4018 "@polkadot/types-known": "1.34.1",
4019 "@polkadot/util": "^3.4.1",
4020 "@polkadot/util-crypto": "^3.4.1",
4021 "bn.js": "^5.1.3",
4022 "eventemitter3": "^4.0.7",
4023 "rxjs": "^6.6.3"
4024 }
4025 },
4026 "@polkadot/api-derive": {
4027 "version": "1.34.1",
4028 "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-1.34.1.tgz",
4029 "integrity": "sha512-LMlCkNJRp29MwKa36crYuY6cZpnkHCFrPCv9dmJEuDbMqrK+EAhXM9/6sTDYJ4uKNhyetJKe9rXslkXdI6pidA==",
4030 "requires": {
4031 "@babel/runtime": "^7.11.2",
4032 "@polkadot/api": "1.34.1",
4033 "@polkadot/rpc-core": "1.34.1",
4034 "@polkadot/rpc-provider": "1.34.1",
4035 "@polkadot/types": "1.34.1",
4036 "@polkadot/util": "^3.4.1",
4037 "@polkadot/util-crypto": "^3.4.1",
4038 "bn.js": "^5.1.3",
4039 "memoizee": "^0.4.14",
4040 "rxjs": "^6.6.3"
4041 }
4042 },
4043 "@polkadot/metadata": {
4044 "version": "1.34.1",
4045 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",
4046 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",
4047 "requires": {
4048 "@babel/runtime": "^7.11.2",
4049 "@polkadot/types": "1.34.1",
4050 "@polkadot/types-known": "1.34.1",
4051 "@polkadot/util": "^3.4.1",
4052 "@polkadot/util-crypto": "^3.4.1",
4053 "bn.js": "^5.1.3"
4054 }
4055 },
4056 "@polkadot/rpc-core": {3982 "@babel/runtime": {
4057 "version": "1.34.1",3983 "version": "7.12.1",
4058 "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-1.34.1.tgz",3984 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4059 "integrity": "sha512-BVQDyBEkbRe5b/u8p9UPpTCj0sDZ32sTmPEP43Klc4s9+oHtiNvOFYvkjK5oyW9dlcOwXi8HpLsQxGAeMtM7Tw==",3985 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4060 "requires": {3986 "requires": {
4061 "@babel/runtime": "^7.11.2",3987 "regenerator-runtime": "^0.13.4"
4062 "@polkadot/metadata": "1.34.1",
4063 "@polkadot/rpc-provider": "1.34.1",
4064 "@polkadot/types": "1.34.1",
4065 "@polkadot/util": "^3.4.1",
4066 "memoizee": "^0.4.14",
4067 "rxjs": "^6.6.3"
4068 }3988 }
4069 },3989 },
4070 "@polkadot/rpc-provider": {
4071 "version": "1.34.1",
4072 "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-1.34.1.tgz",
4073 "integrity": "sha512-bebeis9mB4LS9Spk1WSHoadZHsyHmK4gyyC6uKSLZxHZmnopWna6zWnOBIrYHRz7qDHSZC5eNTseuU8NJXtscA==",
4074 "requires": {
4075 "@babel/runtime": "^7.11.2",
4076 "@polkadot/metadata": "1.34.1",
4077 "@polkadot/types": "1.34.1",
4078 "@polkadot/util": "^3.4.1",
4079 "@polkadot/util-crypto": "^3.4.1",
4080 "@polkadot/x-fetch": "^0.3.2",
4081 "@polkadot/x-ws": "^0.3.2",
4082 "bn.js": "^5.1.3",
4083 "eventemitter3": "^4.0.7"
4084 }
4085 },
4086 "@polkadot/types": {3990 "@polkadot/util": {
4087 "version": "1.34.1",3991 "version": "3.6.1",
4088 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",3992 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4089 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",3993 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4090 "requires": {3994 "requires": {
4091 "@babel/runtime": "^7.11.2",3995 "@babel/runtime": "^7.12.1",
4092 "@polkadot/metadata": "1.34.1",
4093 "@polkadot/util": "^3.4.1",3996 "@polkadot/x-textdecoder": "^0.3.3",
4094 "@polkadot/util-crypto": "^3.4.1",3997 "@polkadot/x-textencoder": "^0.3.3",
4095 "@types/bn.js": "^4.11.6",3998 "@types/bn.js": "^4.11.6",
4096 "bn.js": "^5.1.3",3999 "bn.js": "^5.1.3",
4097 "memoizee": "^0.4.14",4000 "camelcase": "^5.3.1",
4001 "chalk": "^4.1.0",
4098 "rxjs": "^6.6.3"4002 "ip-regex": "^4.2.0"
4099 }4003 }
4100 },4004 },
4101 "@polkadot/types-known": {
4102 "version": "1.34.1",
4103 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",
4104 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",
4105 "requires": {
4106 "@babel/runtime": "^7.11.2",
4107 "@polkadot/types": "1.34.1",
4108 "@polkadot/util": "^3.4.1",
4109 "bn.js": "^5.1.3"
4110 }
4111 },
4112 "@polkadot/util": {4005 "ip-regex": {
4113 "version": "3.4.1",4006 "version": "4.2.0",
4114 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4007 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4115 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4008 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4116 "requires": {
4117 "@babel/runtime": "^7.11.2",
4118 "@types/bn.js": "^4.11.6",
4119 "bn.js": "^5.1.3",
4120 "camelcase": "^5.3.1",
4121 "chalk": "^4.1.0",
4122 "ip-regex": "^4.1.0"
4123 }
4124 }4009 }
4125 }4010 }
4126 },4011 },
4127 "@polkadot/api-derive": {4012 "@polkadot/api-derive": {
4128 "version": "1.34.1",4013 "version": "2.3.1",
4129 "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-1.34.1.tgz",4014 "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-2.3.1.tgz",
4130 "integrity": "sha512-LMlCkNJRp29MwKa36crYuY6cZpnkHCFrPCv9dmJEuDbMqrK+EAhXM9/6sTDYJ4uKNhyetJKe9rXslkXdI6pidA==",4015 "integrity": "sha512-FcDEx+/1Io7zOHPjbQAEzXB0KenA9emgY+96aHS4yPV/OVmAifU0IAxudZdMVp7uVC2dWq9iFvjxx84yCXgVRA==",
4131 "requires": {4016 "requires": {
4132 "@babel/runtime": "^7.11.2",4017 "@babel/runtime": "^7.12.1",
4133 "@polkadot/api": "1.34.1",4018 "@polkadot/api": "2.3.1",
4134 "@polkadot/rpc-core": "1.34.1",4019 "@polkadot/rpc-core": "2.3.1",
4135 "@polkadot/rpc-provider": "1.34.1",4020 "@polkadot/rpc-provider": "2.3.1",
4136 "@polkadot/types": "1.34.1",4021 "@polkadot/types": "2.3.1",
4137 "@polkadot/util": "^3.4.1",4022 "@polkadot/util": "^3.6.1",
4138 "@polkadot/util-crypto": "^3.4.1",4023 "@polkadot/util-crypto": "^3.6.1",
4139 "bn.js": "^5.1.3",4024 "bn.js": "^5.1.3",
4140 "memoizee": "^0.4.14",4025 "memoizee": "^0.4.14",
4141 "rxjs": "^6.6.3"4026 "rxjs": "^6.6.3"
4142 },4027 },
4143 "dependencies": {4028 "dependencies": {
4144 "@polkadot/metadata": {4029 "@babel/runtime": {
4145 "version": "1.34.1",4030 "version": "7.12.1",
4146 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4031 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4147 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4032 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4148 "requires": {4033 "requires": {
4149 "@babel/runtime": "^7.11.2",4034 "regenerator-runtime": "^0.13.4"
4150 "@polkadot/types": "1.34.1",
4151 "@polkadot/types-known": "1.34.1",
4152 "@polkadot/util": "^3.4.1",
4153 "@polkadot/util-crypto": "^3.4.1",
4154 "bn.js": "^5.1.3"
4155 }4035 }
4156 },4036 },
4157 "@polkadot/types": {4037 "@polkadot/util": {
4158 "version": "1.34.1",4038 "version": "3.6.1",
4159 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4039 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4160 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4040 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4161 "requires": {4041 "requires": {
4162 "@babel/runtime": "^7.11.2",4042 "@babel/runtime": "^7.12.1",
4163 "@polkadot/metadata": "1.34.1",
4164 "@polkadot/util": "^3.4.1",4043 "@polkadot/x-textdecoder": "^0.3.3",
4165 "@polkadot/util-crypto": "^3.4.1",4044 "@polkadot/x-textencoder": "^0.3.3",
4166 "@types/bn.js": "^4.11.6",4045 "@types/bn.js": "^4.11.6",
4167 "bn.js": "^5.1.3",4046 "bn.js": "^5.1.3",
4168 "memoizee": "^0.4.14",4047 "camelcase": "^5.3.1",
4048 "chalk": "^4.1.0",
4169 "rxjs": "^6.6.3"4049 "ip-regex": "^4.2.0"
4170 }4050 }
4171 },4051 },
4172 "@polkadot/types-known": {
4173 "version": "1.34.1",
4174 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",
4175 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",
4176 "requires": {
4177 "@babel/runtime": "^7.11.2",
4178 "@polkadot/types": "1.34.1",
4179 "@polkadot/util": "^3.4.1",
4180 "bn.js": "^5.1.3"
4181 }
4182 },
4183 "@polkadot/util": {4052 "ip-regex": {
4184 "version": "3.4.1",4053 "version": "4.2.0",
4185 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4054 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4186 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4055 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4187 "requires": {
4188 "@babel/runtime": "^7.11.2",
4189 "@types/bn.js": "^4.11.6",
4190 "bn.js": "^5.1.3",
4191 "camelcase": "^5.3.1",
4192 "chalk": "^4.1.0",
4193 "ip-regex": "^4.1.0"
4194 }
4195 }4056 }
4196 }4057 }
4197 },4058 },
4277 }4138 }
4278 },4139 },
4279 "@polkadot/keyring": {4140 "@polkadot/keyring": {
4280 "version": "3.4.1",4141 "version": "3.6.1",
4281 "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-3.4.1.tgz",4142 "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-3.6.1.tgz",
4282 "integrity": "sha512-x8FxzDzyFX5ai+tnPaxAFUBV/2Mw/om8sRoMh+fT6Jzh3nC7pXfecH5ticJPKe73v/y42hn9xM0tiAI5P8Ohcw==",4143 "integrity": "sha512-JbW4M5Ct3HaX3vgoa/UWAQVF/0sc1PbbA2D6v0KKaJkXl+EYVP9uyOYAoRCppB6ENZThz7CUJVQp8trs8WTrFQ==",
4283 "requires": {4144 "requires": {
4284 "@babel/runtime": "^7.11.2",4145 "@babel/runtime": "^7.12.1",
4285 "@polkadot/util": "3.4.1",4146 "@polkadot/util": "3.6.1",
4286 "@polkadot/util-crypto": "3.4.1"4147 "@polkadot/util-crypto": "3.6.1"
4287 },4148 },
4288 "dependencies": {4149 "dependencies": {
4150 "@babel/runtime": {
4151 "version": "7.12.1",
4152 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4153 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4154 "requires": {
4155 "regenerator-runtime": "^0.13.4"
4156 }
4157 },
4289 "@polkadot/util": {4158 "@polkadot/util": {
4290 "version": "3.4.1",4159 "version": "3.6.1",
4291 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4160 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4292 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4161 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4293 "requires": {4162 "requires": {
4294 "@babel/runtime": "^7.11.2",4163 "@babel/runtime": "^7.12.1",
4164 "@polkadot/x-textdecoder": "^0.3.3",
4165 "@polkadot/x-textencoder": "^0.3.3",
4295 "@types/bn.js": "^4.11.6",4166 "@types/bn.js": "^4.11.6",
4296 "bn.js": "^5.1.3",4167 "bn.js": "^5.1.3",
4297 "camelcase": "^5.3.1",4168 "camelcase": "^5.3.1",
4298 "chalk": "^4.1.0",4169 "chalk": "^4.1.0",
4299 "ip-regex": "^4.1.0"4170 "ip-regex": "^4.2.0"
4300 }4171 }
4301 }4172 },
4173 "ip-regex": {
4174 "version": "4.2.0",
4175 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4176 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4177 }
4302 }4178 }
4303 },4179 },
4304 "@polkadot/metadata": {4180 "@polkadot/metadata": {
4305 "version": "1.34.1",4181 "version": "2.3.1",
4306 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4182 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-2.3.1.tgz",
4307 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4183 "integrity": "sha512-F/QwDDR/d9mcqToDqndRTUYvMt/GYzjQ+kNGjQYBOIDRqF9zDbPHAXruqcHd0Y5MMpPMRBZGNaqPOb3BMrIdOQ==",
4308 "requires": {4184 "requires": {
4309 "@babel/runtime": "^7.11.2",4185 "@babel/runtime": "^7.12.1",
4310 "@polkadot/types": "1.34.1",4186 "@polkadot/types": "2.3.1",
4311 "@polkadot/types-known": "1.34.1",4187 "@polkadot/types-known": "2.3.1",
4312 "@polkadot/util": "^3.4.1",4188 "@polkadot/util": "^3.6.1",
4313 "@polkadot/util-crypto": "^3.4.1",4189 "@polkadot/util-crypto": "^3.6.1",
4314 "bn.js": "^5.1.3"4190 "bn.js": "^5.1.3"
4315 },4191 },
4316 "dependencies": {4192 "dependencies": {
4193 "@babel/runtime": {
4194 "version": "7.12.1",
4195 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4196 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4197 "requires": {
4198 "regenerator-runtime": "^0.13.4"
4199 }
4200 },
4317 "@polkadot/util": {4201 "@polkadot/util": {
4318 "version": "3.4.1",4202 "version": "3.6.1",
4319 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4203 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4320 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4204 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4321 "requires": {4205 "requires": {
4322 "@babel/runtime": "^7.11.2",4206 "@babel/runtime": "^7.12.1",
4207 "@polkadot/x-textdecoder": "^0.3.3",
4208 "@polkadot/x-textencoder": "^0.3.3",
4323 "@types/bn.js": "^4.11.6",4209 "@types/bn.js": "^4.11.6",
4324 "bn.js": "^5.1.3",4210 "bn.js": "^5.1.3",
4325 "camelcase": "^5.3.1",4211 "camelcase": "^5.3.1",
4326 "chalk": "^4.1.0",4212 "chalk": "^4.1.0",
4327 "ip-regex": "^4.1.0"4213 "ip-regex": "^4.2.0"
4328 }4214 }
4329 }4215 },
4216 "ip-regex": {
4217 "version": "4.2.0",
4218 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4219 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4220 }
4330 }4221 }
4331 },4222 },
4223 "@polkadot/networks": {
4224 "version": "3.6.1",
4225 "resolved": "https://registry.npmjs.org/@polkadot/networks/-/networks-3.6.1.tgz",
4226 "integrity": "sha512-PEEw/vTZaKf32vuAUeFXYNJei+b/s3hr7msMKfvoYeKDU/otgt9Mgkqrh6VCaE6+lHHgX8vLbH70pCqQrGG/uA==",
4227 "requires": {
4228 "@babel/runtime": "^7.12.1"
4229 },
4230 "dependencies": {
4231 "@babel/runtime": {
4232 "version": "7.12.1",
4233 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4234 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4235 "requires": {
4236 "regenerator-runtime": "^0.13.4"
4237 }
4238 }
4239 }
4240 },
4332 "@polkadot/rpc-core": {4241 "@polkadot/rpc-core": {
4333 "version": "1.34.1",4242 "version": "2.3.1",
4334 "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-1.34.1.tgz",4243 "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-2.3.1.tgz",
4335 "integrity": "sha512-BVQDyBEkbRe5b/u8p9UPpTCj0sDZ32sTmPEP43Klc4s9+oHtiNvOFYvkjK5oyW9dlcOwXi8HpLsQxGAeMtM7Tw==",4244 "integrity": "sha512-SWYU6azxNwWkhz6bm/wpRPQZ/5KJ2hnEXPS4EN77q7EFH4c4k9mNtVyjUQFkKJsG7T85vxaCCWwhx60aYCZVeA==",
4336 "requires": {4245 "requires": {
4337 "@babel/runtime": "^7.11.2",4246 "@babel/runtime": "^7.12.1",
4338 "@polkadot/metadata": "1.34.1",4247 "@polkadot/metadata": "2.3.1",
4339 "@polkadot/rpc-provider": "1.34.1",4248 "@polkadot/rpc-provider": "2.3.1",
4340 "@polkadot/types": "1.34.1",4249 "@polkadot/types": "2.3.1",
4341 "@polkadot/util": "^3.4.1",4250 "@polkadot/util": "^3.6.1",
4342 "memoizee": "^0.4.14",4251 "memoizee": "^0.4.14",
4343 "rxjs": "^6.6.3"4252 "rxjs": "^6.6.3"
4344 },4253 },
4345 "dependencies": {4254 "dependencies": {
4346 "@polkadot/metadata": {4255 "@babel/runtime": {
4347 "version": "1.34.1",4256 "version": "7.12.1",
4348 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4257 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4349 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4258 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4350 "requires": {4259 "requires": {
4351 "@babel/runtime": "^7.11.2",4260 "regenerator-runtime": "^0.13.4"
4352 "@polkadot/types": "1.34.1",
4353 "@polkadot/types-known": "1.34.1",
4354 "@polkadot/util": "^3.4.1",
4355 "@polkadot/util-crypto": "^3.4.1",
4356 "bn.js": "^5.1.3"
4357 }4261 }
4358 },4262 },
4359 "@polkadot/types": {4263 "@polkadot/util": {
4360 "version": "1.34.1",4264 "version": "3.6.1",
4361 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4265 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4362 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4266 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4363 "requires": {4267 "requires": {
4364 "@babel/runtime": "^7.11.2",4268 "@babel/runtime": "^7.12.1",
4365 "@polkadot/metadata": "1.34.1",
4366 "@polkadot/util": "^3.4.1",4269 "@polkadot/x-textdecoder": "^0.3.3",
4367 "@polkadot/util-crypto": "^3.4.1",4270 "@polkadot/x-textencoder": "^0.3.3",
4368 "@types/bn.js": "^4.11.6",4271 "@types/bn.js": "^4.11.6",
4369 "bn.js": "^5.1.3",4272 "bn.js": "^5.1.3",
4370 "memoizee": "^0.4.14",4273 "camelcase": "^5.3.1",
4274 "chalk": "^4.1.0",
4371 "rxjs": "^6.6.3"4275 "ip-regex": "^4.2.0"
4372 }4276 }
4373 },4277 },
4374 "@polkadot/types-known": {
4375 "version": "1.34.1",
4376 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",
4377 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",
4378 "requires": {
4379 "@babel/runtime": "^7.11.2",
4380 "@polkadot/types": "1.34.1",
4381 "@polkadot/util": "^3.4.1",
4382 "bn.js": "^5.1.3"
4383 }
4384 },
4385 "@polkadot/util": {4278 "ip-regex": {
4386 "version": "3.4.1",4279 "version": "4.2.0",
4387 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4280 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4388 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4281 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4389 "requires": {
4390 "@babel/runtime": "^7.11.2",
4391 "@types/bn.js": "^4.11.6",
4392 "bn.js": "^5.1.3",
4393 "camelcase": "^5.3.1",
4394 "chalk": "^4.1.0",
4395 "ip-regex": "^4.1.0"
4396 }
4397 }4282 }
4398 }4283 }
4399 },4284 },
4400 "@polkadot/rpc-provider": {4285 "@polkadot/rpc-provider": {
4401 "version": "1.34.1",4286 "version": "2.3.1",
4402 "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-1.34.1.tgz",4287 "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-2.3.1.tgz",
4403 "integrity": "sha512-bebeis9mB4LS9Spk1WSHoadZHsyHmK4gyyC6uKSLZxHZmnopWna6zWnOBIrYHRz7qDHSZC5eNTseuU8NJXtscA==",4288 "integrity": "sha512-lRN68RosWvtBA844PWqhYEV2ifT3T9SUyAP2WvRYyWVPiMmXjw57qG1zHKQWgZk5aFzeaHKSYgsKTmkWz9IM4g==",
4404 "requires": {4289 "requires": {
4405 "@babel/runtime": "^7.11.2",4290 "@babel/runtime": "^7.12.1",
4406 "@polkadot/metadata": "1.34.1",4291 "@polkadot/metadata": "2.3.1",
4407 "@polkadot/types": "1.34.1",4292 "@polkadot/types": "2.3.1",
4408 "@polkadot/util": "^3.4.1",4293 "@polkadot/util": "^3.6.1",
4409 "@polkadot/util-crypto": "^3.4.1",4294 "@polkadot/util-crypto": "^3.6.1",
4410 "@polkadot/x-fetch": "^0.3.2",4295 "@polkadot/x-fetch": "^0.3.3",
4411 "@polkadot/x-ws": "^0.3.2",4296 "@polkadot/x-ws": "^0.3.3",
4412 "bn.js": "^5.1.3",4297 "bn.js": "^5.1.3",
4413 "eventemitter3": "^4.0.7"4298 "eventemitter3": "^4.0.7"
4414 },4299 },
4415 "dependencies": {4300 "dependencies": {
4416 "@polkadot/metadata": {4301 "@babel/runtime": {
4417 "version": "1.34.1",4302 "version": "7.12.1",
4418 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4303 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4419 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4304 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4420 "requires": {4305 "requires": {
4421 "@babel/runtime": "^7.11.2",4306 "regenerator-runtime": "^0.13.4"
4422 "@polkadot/types": "1.34.1",
4423 "@polkadot/types-known": "1.34.1",
4424 "@polkadot/util": "^3.4.1",
4425 "@polkadot/util-crypto": "^3.4.1",
4426 "bn.js": "^5.1.3"
4427 }4307 }
4428 },4308 },
4429 "@polkadot/types": {4309 "@polkadot/util": {
4430 "version": "1.34.1",4310 "version": "3.6.1",
4431 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4311 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4432 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4312 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4433 "requires": {4313 "requires": {
4434 "@babel/runtime": "^7.11.2",4314 "@babel/runtime": "^7.12.1",
4435 "@polkadot/metadata": "1.34.1",
4436 "@polkadot/util": "^3.4.1",4315 "@polkadot/x-textdecoder": "^0.3.3",
4437 "@polkadot/util-crypto": "^3.4.1",4316 "@polkadot/x-textencoder": "^0.3.3",
4438 "@types/bn.js": "^4.11.6",4317 "@types/bn.js": "^4.11.6",
4439 "bn.js": "^5.1.3",4318 "bn.js": "^5.1.3",
4440 "memoizee": "^0.4.14",4319 "camelcase": "^5.3.1",
4320 "chalk": "^4.1.0",
4441 "rxjs": "^6.6.3"4321 "ip-regex": "^4.2.0"
4442 }4322 }
4443 },4323 },
4444 "@polkadot/types-known": {
4445 "version": "1.34.1",
4446 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",
4447 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",
4448 "requires": {
4449 "@babel/runtime": "^7.11.2",
4450 "@polkadot/types": "1.34.1",
4451 "@polkadot/util": "^3.4.1",
4452 "bn.js": "^5.1.3"
4453 }
4454 },
4455 "@polkadot/util": {4324 "ip-regex": {
4456 "version": "3.4.1",4325 "version": "4.2.0",
4457 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4326 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4458 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4327 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4459 "requires": {
4460 "@babel/runtime": "^7.11.2",
4461 "@types/bn.js": "^4.11.6",
4462 "bn.js": "^5.1.3",
4463 "camelcase": "^5.3.1",
4464 "chalk": "^4.1.0",
4465 "ip-regex": "^4.1.0"
4466 }
4467 }4328 }
4468 }4329 }
4469 },4330 },
4477 }4338 }
4478 },4339 },
4479 "@polkadot/types": {4340 "@polkadot/types": {
4480 "version": "1.34.1",4341 "version": "2.3.1",
4481 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4342 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-2.3.1.tgz",
4482 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4343 "integrity": "sha512-G3cyYYV+vYmpkMjPirwOA/zLreb1uBrKpEMWTvtTuCz/sNwcbCT5hI/KZCzNo1PueOQAowroKPe4yQ793dqVPw==",
4483 "requires": {4344 "requires": {
4484 "@babel/runtime": "^7.11.2",4345 "@babel/runtime": "^7.12.1",
4485 "@polkadot/metadata": "1.34.1",4346 "@polkadot/metadata": "2.3.1",
4486 "@polkadot/util": "^3.4.1",4347 "@polkadot/util": "^3.6.1",
4487 "@polkadot/util-crypto": "^3.4.1",4348 "@polkadot/util-crypto": "^3.6.1",
4488 "@types/bn.js": "^4.11.6",4349 "@types/bn.js": "^4.11.6",
4489 "bn.js": "^5.1.3",4350 "bn.js": "^5.1.3",
4490 "memoizee": "^0.4.14",4351 "memoizee": "^0.4.14",
4491 "rxjs": "^6.6.3"4352 "rxjs": "^6.6.3"
4492 },4353 },
4493 "dependencies": {4354 "dependencies": {
4355 "@babel/runtime": {
4356 "version": "7.12.1",
4357 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4358 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4359 "requires": {
4360 "regenerator-runtime": "^0.13.4"
4361 }
4362 },
4494 "@polkadot/util": {4363 "@polkadot/util": {
4495 "version": "3.4.1",4364 "version": "3.6.1",
4496 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4365 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4497 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4366 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4498 "requires": {4367 "requires": {
4499 "@babel/runtime": "^7.11.2",4368 "@babel/runtime": "^7.12.1",
4369 "@polkadot/x-textdecoder": "^0.3.3",
4370 "@polkadot/x-textencoder": "^0.3.3",
4500 "@types/bn.js": "^4.11.6",4371 "@types/bn.js": "^4.11.6",
4501 "bn.js": "^5.1.3",4372 "bn.js": "^5.1.3",
4502 "camelcase": "^5.3.1",4373 "camelcase": "^5.3.1",
4503 "chalk": "^4.1.0",4374 "chalk": "^4.1.0",
4504 "ip-regex": "^4.1.0"4375 "ip-regex": "^4.2.0"
4505 }4376 }
4506 }4377 },
4378 "ip-regex": {
4379 "version": "4.2.0",
4380 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4381 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4382 }
4507 }4383 }
4508 },4384 },
4509 "@polkadot/types-known": {4385 "@polkadot/types-known": {
4510 "version": "1.34.1",4386 "version": "2.3.1",
4511 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",4387 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-2.3.1.tgz",
4512 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",4388 "integrity": "sha512-34yuvDraW9Sjy5ookQZf55sBKLOsTqos+WQdTu6DUxtRuwvMP9DEAGcs2m6AFvWxwZps+3zFGUvzn6SMHsSJ5Q==",
4513 "requires": {4389 "requires": {
4514 "@babel/runtime": "^7.11.2",4390 "@babel/runtime": "^7.12.1",
4515 "@polkadot/types": "1.34.1",4391 "@polkadot/types": "2.3.1",
4516 "@polkadot/util": "^3.4.1",4392 "@polkadot/util": "^3.6.1",
4517 "bn.js": "^5.1.3"4393 "bn.js": "^5.1.3"
4518 },4394 },
4519 "dependencies": {4395 "dependencies": {
4396 "@babel/runtime": {
4397 "version": "7.12.1",
4398 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4399 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4400 "requires": {
4401 "regenerator-runtime": "^0.13.4"
4402 }
4403 },
4520 "@polkadot/util": {4404 "@polkadot/util": {
4521 "version": "3.4.1",4405 "version": "3.6.1",
4522 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4406 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4523 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4407 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4524 "requires": {4408 "requires": {
4525 "@babel/runtime": "^7.11.2",4409 "@babel/runtime": "^7.12.1",
4410 "@polkadot/x-textdecoder": "^0.3.3",
4411 "@polkadot/x-textencoder": "^0.3.3",
4526 "@types/bn.js": "^4.11.6",4412 "@types/bn.js": "^4.11.6",
4527 "bn.js": "^5.1.3",4413 "bn.js": "^5.1.3",
4528 "camelcase": "^5.3.1",4414 "camelcase": "^5.3.1",
4529 "chalk": "^4.1.0",4415 "chalk": "^4.1.0",
4530 "ip-regex": "^4.1.0"4416 "ip-regex": "^4.2.0"
4531 }4417 }
4532 }4418 },
4419 "ip-regex": {
4420 "version": "4.2.0",
4421 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4422 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4423 }
4533 }4424 }
4534 },4425 },
4535 "@polkadot/util": {4426 "@polkadot/util": {
4546 }4437 }
4547 },4438 },
4548 "@polkadot/util-crypto": {4439 "@polkadot/util-crypto": {
4549 "version": "3.4.1",4440 "version": "3.6.1",
4550 "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-3.4.1.tgz",4441 "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-3.6.1.tgz",
4551 "integrity": "sha512-RdTAiJ6dFE8nQJ7/wQkvYa6aNZG3Lusf/r7UmPJ56dZldvDTP3OdekzcfYdogU8hSJrE/xX84ii4DrHLnXXfAQ==",4442 "integrity": "sha512-mRCijOXrxTa2JD5vpNvr1MHSj3NaSGaImg1yzAf3l7nw7zNGjLy1K3qQNcFgr8+0NHyPKk5lCIehtwGTRZYsiA==",
4552 "requires": {4443 "requires": {
4553 "@babel/runtime": "^7.11.2",4444 "@babel/runtime": "^7.12.1",
4445 "@polkadot/networks": "3.6.1",
4554 "@polkadot/util": "3.4.1",4446 "@polkadot/util": "3.6.1",
4555 "@polkadot/wasm-crypto": "^1.4.1",4447 "@polkadot/wasm-crypto": "^1.4.1",
4556 "base-x": "^3.0.8",4448 "base-x": "^3.0.8",
4557 "bip39": "^3.0.2",4449 "bip39": "^3.0.2",
4565 "xxhashjs": "^0.2.2"4457 "xxhashjs": "^0.2.2"
4566 },4458 },
4567 "dependencies": {4459 "dependencies": {
4460 "@babel/runtime": {
4461 "version": "7.12.1",
4462 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4463 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4464 "requires": {
4465 "regenerator-runtime": "^0.13.4"
4466 }
4467 },
4568 "@polkadot/util": {4468 "@polkadot/util": {
4569 "version": "3.4.1",4469 "version": "3.6.1",
4570 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4470 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.6.1.tgz",
4571 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4471 "integrity": "sha512-ToGVghmTtC8s8cg8mCGG3I88UasrCg9VNm5JoUvBH4nTZCxc/dQEkU24nULXwHUpmd7d39p3RLpVbkLCVYIMZw==",
4572 "requires": {4472 "requires": {
4573 "@babel/runtime": "^7.11.2",4473 "@babel/runtime": "^7.12.1",
4474 "@polkadot/x-textdecoder": "^0.3.3",
4475 "@polkadot/x-textencoder": "^0.3.3",
4574 "@types/bn.js": "^4.11.6",4476 "@types/bn.js": "^4.11.6",
4575 "bn.js": "^5.1.3",4477 "bn.js": "^5.1.3",
4576 "camelcase": "^5.3.1",4478 "camelcase": "^5.3.1",
4577 "chalk": "^4.1.0",4479 "chalk": "^4.1.0",
4578 "ip-regex": "^4.1.0"4480 "ip-regex": "^4.2.0"
4579 }4481 }
4580 }4482 },
4483 "ip-regex": {
4484 "version": "4.2.0",
4485 "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz",
4486 "integrity": "sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A=="
4487 }
4581 }4488 }
4582 },4489 },
4583 "@polkadot/wasm-crypto": {4490 "@polkadot/wasm-crypto": {
4586 "integrity": "sha512-GPBCh8YvQmA5bobI4rqRkUhrEHkEWU1+lcJVPbZYsa7jiHFaZpzCLrGQfiqW/vtbU1aBS2wmJ0x1nlt33B9QqQ=="4493 "integrity": "sha512-GPBCh8YvQmA5bobI4rqRkUhrEHkEWU1+lcJVPbZYsa7jiHFaZpzCLrGQfiqW/vtbU1aBS2wmJ0x1nlt33B9QqQ=="
4587 },4494 },
4588 "@polkadot/x-fetch": {4495 "@polkadot/x-fetch": {
4589 "version": "0.3.2",4496 "version": "0.3.3",
4590 "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-0.3.2.tgz",4497 "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-0.3.3.tgz",
4591 "integrity": "sha512-lk9M8ql/kBBqiZ8KOWj7LFK7P9OxDgVn2fZPNELJzQbfFZwFF8umBPDIWlQIK7wTnlRsQlzOuf6MGEyMK5p42w==",4498 "integrity": "sha512-Osa+ifkqlndIW5U5jLnuugLYTd6q/cHkjdfisyYgNev/etsEtXkqesbGvF/UKw5FgZBxhK8sj6jjfProfh2NZw==",
4592 "requires": {4499 "requires": {
4593 "@babel/runtime": "^7.11.2",4500 "@babel/runtime": "^7.12.1",
4594 "@types/node-fetch": "^2.5.7",4501 "@types/node-fetch": "^2.5.7",
4595 "node-fetch": "^2.6.1"4502 "node-fetch": "^2.6.1"
4596 },4503 },
4597 "dependencies": {4504 "dependencies": {
4598 "node-fetch": {4505 "@babel/runtime": {
4599 "version": "2.6.1",4506 "version": "7.12.1",
4600 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",4507 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4601 "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="4508 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4509 "requires": {
4510 "regenerator-runtime": "^0.13.4"
4511 }
4602 }4512 }
4603 }4513 }
4604 },4514 },
4515 "@polkadot/x-textdecoder": {
4516 "version": "0.3.3",
4517 "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-0.3.3.tgz",
4518 "integrity": "sha512-ehbPUUNn34kJh/RV8eQwyLnAFcMQSbtGPKqGRB7GSa/bL7P6hh1QGxB4DwvtlFU//bDTlofsv44ydpjDNmfWLg==",
4519 "requires": {
4520 "@babel/runtime": "^7.12.1"
4521 },
4522 "dependencies": {
4523 "@babel/runtime": {
4524 "version": "7.12.1",
4525 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4526 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4527 "requires": {
4528 "regenerator-runtime": "^0.13.4"
4529 }
4530 }
4531 }
4532 },
4533 "@polkadot/x-textencoder": {
4534 "version": "0.3.3",
4535 "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-0.3.3.tgz",
4536 "integrity": "sha512-klbz82L5LxDJTFoCO64G/EFfY1mKXHDlteJMDGFTOim/1oK1ypLOG8/7BmncmQAw2BevA0r1YkvWN+F3muJSag==",
4537 "requires": {
4538 "@babel/runtime": "^7.12.1"
4539 },
4540 "dependencies": {
4541 "@babel/runtime": {
4542 "version": "7.12.1",
4543 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4544 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4545 "requires": {
4546 "regenerator-runtime": "^0.13.4"
4547 }
4548 }
4549 }
4550 },
4605 "@polkadot/x-ws": {4551 "@polkadot/x-ws": {
4606 "version": "0.3.2",4552 "version": "0.3.3",
4607 "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-0.3.2.tgz",4553 "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-0.3.3.tgz",
4608 "integrity": "sha512-1aiG11Py8sgzJsz19melMzvBOn5zeMmfjCPoMryX4//063E0mcfnkujg4O6pTMygxJdFGAV1INB9wvMU9Dg9Wg==",4554 "integrity": "sha512-t06ID5QLYi5B8bzlT2fcYsQ09yfLf5Uq9idunKRZj13EwSELaqvZFfn2UmiDFiIB1H5u7c2y+VDWbIdqE8ZxKw==",
4609 "requires": {4555 "requires": {
4610 "@babel/runtime": "^7.11.2",4556 "@babel/runtime": "^7.12.1",
4611 "@types/websocket": "^1.0.1",4557 "@types/websocket": "^1.0.1",
4612 "websocket": "^1.0.32"4558 "websocket": "^1.0.32"
4613 }4559 },
4560 "dependencies": {
4561 "@babel/runtime": {
4562 "version": "7.12.1",
4563 "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz",
4564 "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==",
4565 "requires": {
4566 "regenerator-runtime": "^0.13.4"
4567 }
4568 }
4569 }
4614 },4570 },
4615 "@sindresorhus/is": {4571 "@sindresorhus/is": {
4616 "version": "0.14.0",4572 "version": "0.14.0",
16840 "lower-case": "^1.1.1"16796 "lower-case": "^1.1.1"
16841 }16797 }
16842 },16798 },
16799 "node-fetch": {
16800 "version": "2.6.1",
16801 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
16802 "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
16803 },
16843 "node-fetch-npm": {16804 "node-fetch-npm": {
16844 "version": "2.0.4",16805 "version": "2.0.4",
16845 "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz",16806 "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz",
modifiedtests/package.jsondiffbeforeafterboth
23 "license": "Apache 2.0",23 "license": "Apache 2.0",
24 "homepage": "",24 "homepage": "",
25 "dependencies": {25 "dependencies": {
26 "@polkadot/api": "^1.34.1",26 "@polkadot/api": "^2.3.1",
27 "@polkadot/api-contract": "^1.34.1",27 "@polkadot/api-contract": "^2.3.1",
28 "@polkadot/types": "^1.34.1",28 "@polkadot/types": "^2.3.1",
29 "@polkadot/util": "^3.4.1",29 "@polkadot/util": "^3.4.1",
30 "@types/bn.js": "^4.11.6",30 "@types/bn.js": "^4.11.6",
31 "chai-as-promised": "^7.1.1"31 "chai-as-promised": "^7.1.1"
modifiedtests/src/contracts.test.tsdiffbeforeafterboth
1import { expect } from "chai";1import { expect } from "chai";
2import usingApi from "./substrate/substrate-api";2import usingApi from "./substrate/substrate-api";
3import promisifySubstrate from "./substrate/promisify-substrate";
4import fs from "fs";3import fs from "fs";
5import privateKey from "./substrate/privateKey";
6import { compactAddLength, u8aToU8a } from '@polkadot/util';
7import { Hash, AccountId } from "@polkadot/types/interfaces";
8import { Abi, PromiseContract } from "@polkadot/api-contract";4import { Abi, BlueprintPromise, CodePromise } from "@polkadot/api-contract";
9import { ISubmittableResult, IKeyringPair } from "@polkadot/types/types";5import { IKeyringPair } from "@polkadot/types/types";
10import BN from "bn.js";
11import { alicesPublicKey, bobsPublicKey } from "./accounts";
12import { ApiPromise } from "@polkadot/api";6import { Keyring } from "@polkadot/api";
13import { GenericAccountId, u128 } from "@polkadot/types";7import { ApiTypes, SubmittableExtrinsic } from "@polkadot/api/types";
8
14import getBalance from "./substrate/get-balance";9const value = 0;
1510const gasLimit = 3000n * 1000000n;
1611
17function deployContract(api: ApiPromise, contract: Uint8Array, privateKey: IKeyringPair): Promise<Hash> {12function deployBlueprint(alice: IKeyringPair, code: CodePromise): Promise<BlueprintPromise> {
18 return promisifySubstrate(api, () => {13 return new Promise<BlueprintPromise>(async (resolve, reject) => {
19 return new Promise<Hash>(async (resolve, reject) => {
20 const unsubscribe = api.tx.contracts.putCode(contract).signAndSend(privateKey, async result => {14 const unsub = await code
15 .createBlueprint()
16 .signAndSend(alice, (result) => {
21 if(!result.isInBlock){17 if (result.status.isInBlock || result.status.isFinalized) {
22 return;18 // here we have an additional field in the result, containing the blueprint
23 }
24
25 const record = result.findRecord('contracts', 'CodeStored');
26
27 if(record) {
28 (await unsubscribe)();
29 resolve(record.event.data[0] as unknown as Hash);19 resolve(result.blueprint);
30 } else {
31 reject('Failed to find contract hash in putCode transaction result.');20 unsub();
32 }21 }
33 });22 })
34 })23 });
35 })();
36}24}
3725
38function instantiateContract(api: ApiPromise, contractHash: Hash, args: Uint8Array, privateKey: IKeyringPair): Promise<AccountId> {26function deployContract(alice: IKeyringPair, blueprint: BlueprintPromise) : Promise<any> {
39 return promisifySubstrate(api, () => {27 return new Promise<any>(async (resolve, reject) => {
40 return new Promise<AccountId>((resolve, reject) => {28 const endowment = 1000000000000000n;
29 const initValue = true;
30
41 const unsubscribe = api.tx.contracts.instantiate(1000000000000000n, 1000000000000n, contractHash, args)31 const unsub = await blueprint.tx
32 .new(endowment, gasLimit, initValue)
42 .signAndSend(privateKey, async (result:ISubmittableResult) => {33 .signAndSend(alice, (result) => {
43 if(!result.isInBlock) {
44 return;
45 }
46 const record = result.findRecord('contracts', 'Instantiated');
47 if(record) {34 if (result.status.isInBlock || result.status.isFinalized) {
48 (await unsubscribe)();
49 expect(alicesPublicKey).to.be.equal(record.event.data[0].toString());
50 resolve(record.event.data[1] as AccountId);35 unsub();
51 } else {
52 reject('Failed to find instantiated event.');36 resolve(result);
53 }37 }
54 });38 });
55 });39 });
56 })();
57}40}
5841
59function txContractCall(api: ApiPromise, privateKey: IKeyringPair, address: string, call: Uint8Array): Promise<void> {42function runTransaction(privateKey: IKeyringPair, extrinsic: SubmittableExtrinsic<ApiTypes>) {
60 return promisifySubstrate(api, async () => {43 return new Promise<void>(async (resolve, reject) => {
61 return new Promise<void>(async (resolve, reject) => {
62 api.tx.contracts.call(address, 0, 1000000000000n, call)
63 .signAndSend(privateKey, async result => {44 extrinsic.signAndSend(privateKey, async result => {
64 if(!result.isInBlock) {45 if(!result.isInBlock) {
65 return;46 return;
66 }47 }
69 resolve();50 resolve();
70 }51 }
71 else {52 else {
72 reject('Failed to execute tx call.');53 reject('Failed to flip value.');
73 }54 }
74 })55 })
75 });56 });
76 })();
77}57}
7858
79describe('Contracts', () => {59describe('Contracts', () => {
80 it(`Can deploy smart contract Flipper, instantiate it and call it's get and flip messages.`, async () => {60 it(`Can deploy smart contract Flipper, instantiate it and call it's get and flip messages.`, async () => {
81 await usingApi(async api => {61 await usingApi(async api => {
62 const keyring = new Keyring({ type: 'sr25519' });
82 const wasm = fs.readFileSync('./src/flipper/flipper.wasm');63 const alice = keyring.addFromUri("//Alice");
64
83 const contract = compactAddLength(u8aToU8a(wasm));65 const wasm = fs.readFileSync('./src/flipper/flipper.wasm');
8466
85 const metadata = JSON.parse(fs.readFileSync('./src/flipper/metadata.json').toString('utf-8'));67 const metadata = JSON.parse(fs.readFileSync('./src/flipper/metadata.json').toString('utf-8'));
86 const abi = new Abi(api.registry as any, metadata);68 const abi = new Abi(metadata);
87
88 const alicesPrivateKey = privateKey('//Alice');
8969
90 const contractHash = await deployContract(api, contract, alicesPrivateKey);70 const code = new CodePromise(api, abi, wasm);
9171
92 const args = abi.constructors[0](true);
93 const instanceAccountId = await instantiateContract(api, contractHash, args, alicesPrivateKey);72 const blueprint = await deployBlueprint(alice, code);
94
95 const contractInstance = new PromiseContract(api, abi, instanceAccountId);73 const contract = (await deployContract(alice, blueprint))['contract'];
74
96 const getFlipValue = async () => {75 const getFlipValue = async () => {
97 return await promisifySubstrate(api, async () => {
98 const result = await contractInstance.call('rpc', 'get', 0, new BN('1000000000000'))76 const result = await contract.query.get(alice.address, value, gasLimit);
99 .send(alicesPublicKey);77
100 if(!result.isSuccess) {78 if(!result.result.isSuccess) {
101 throw 'Failed to get flipper value';79 throw `Failed to get flipper value`;
102 }80 }
103 return result.output && result.output.valueOf && result.output.valueOf();
104 })();81 return (result.result.asSuccess.data[0] == 0x00) ? false : true;
105 }82 }
10683
107 const initialGetResponse = await getFlipValue();84 const initialGetResponse = await getFlipValue();
108 expect(initialGetResponse).to.be.true;85 expect(initialGetResponse).to.be.true;
10986
110 await promisifySubstrate(api, async () => {
111 return new Promise<void>(async (resolve, reject) => {
112 api.tx.contracts.call(contractInstance.address.toString(), 0, 1000000000000n, contractInstance.getMessage('flip').fn())87 const flip = contract.exec('flip', value, gasLimit);
113 .signAndSend(alicesPrivateKey, async result => {88 await runTransaction(alice, flip);
114 if(!result.isInBlock) {
115 return;
116 }
117
118 if(result.findRecord('system', 'ExtrinsicSuccess')) {
119 resolve();
120 }
121 else {
122 reject('Failed to flip value.');
123 }
124 })
125 });
126 })();
12789
128 const afterFlipGetResponse = await getFlipValue();90 const afterFlipGetResponse = await getFlipValue();
12991
130 expect(afterFlipGetResponse).to.be.false;92 expect(afterFlipGetResponse).to.be.false;
131 });93 });
132 });94 });
13395
134 it('Can transfer balance using smart contract.', async () => {96 it.skip('Can transfer balance using smart contract.', async () => {
135 await usingApi(async api => {97 await usingApi(async api => {
136 const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);98 // const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);
137 const wasm = fs.readFileSync('./src/balance-transfer-contract/calls.wasm');99 // const wasm = fs.readFileSync('./src/balance-transfer-contract/calls.wasm');
138 const contract = compactAddLength(u8aToU8a(wasm));100 // const contract = compactAddLength(u8aToU8a(wasm));
139101
140 const metadata = JSON.parse(fs.readFileSync('./src/balance-transfer-contract/metadata.json').toString('utf-8'));102 // const metadata = JSON.parse(fs.readFileSync('./src/balance-transfer-contract/metadata.json').toString('utf-8'));
141 const abi = new Abi(api.registry as any, metadata);103 // const abi = new Abi(api.registry as any, metadata);
142104
143 const alicesPrivateKey = privateKey('//Alice');105 // const alicesPrivateKey = privateKey('//Alice');
144106
145 const contractHash = await deployContract(api, contract, alicesPrivateKey);107 // const contractHash = await deployContract(api, contract, alicesPrivateKey);
146108
147 const args = abi.constructors[0]();109 // // const args = abi.constructors[0]();
148 const instanceAccountId = await instantiateContract(api, contractHash, args, alicesPrivateKey);110 // const instanceAccountId = await instantiateContract(api, contractHash, /*args,*/ alicesPrivateKey);
149 const contractInstance = new PromiseContract(api, abi, instanceAccountId);111 // const contractInstance = new ContractPromise(api, abi, instanceAccountId);
150 const bob = new GenericAccountId(api.registry, bobsPublicKey);112 // const bob = new GenericAccountId(api.registry, bobsPublicKey);
151 const call = contractInstance.getMessage('balance_transfer').fn(bob, new u128(api.registry, 1000000));113
152 await txContractCall(api, alicesPrivateKey, contractInstance.address.toString(), call);114 // const transfer = contractInstance.exec('balance_transfer', 0, 1000000000000n, [bob, new u128(api.registry, 1000000)]);
153115 // await runTransaction(alicesPrivateKey, transfer);
154 const [alicesBalanceAfter, bobsBalanceAfter] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);116
155117 // const [alicesBalanceAfter, bobsBalanceAfter] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);
156 expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true;118
157 expect(bobsBalanceAfter > bobsBalanceBefore).to.be.true;119 // expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true;
120 // expect(bobsBalanceAfter > bobsBalanceBefore).to.be.true;
158 });121 });
159 })122 })
160});123});
modifiedtests/src/flipper/flipper.wasmdiffbeforeafterboth

binary blob — no preview

modifiedtests/src/flipper/metadata.jsondiffbeforeafterboth
1{1{
2 "metadataVersion": "0.1.0",
2 "registry": {3 "source": {
3 "strings": [4 "hash": "0x36431d9da78a6bb099474e49c9e35a9c3a04272b58815634082626109826cac6",
4 "Storage",5 "language": "ink! 3.0.0-rc1",
5 "flipper",6 "compiler": "rustc 1.49.0-nightly"
6 "__ink_private",
7 "__ink_storage",
8 "value",
9 "Value",
10 "ink_core",
11 "storage",
12 "cell",
13 "SyncCell",
14 "sync_cell",
15 "Key",
16 "ink_primitives",
17 "new",
18 "init_value",
19 "bool",
20 "default",
21 "flip",
22 "get"
23 ],7 },
24 "types": [8 "contract": {
25 {
26 "id": {
27 "custom.name": 1,
28 "custom.namespace": [
29 2,
30 2,
31 3,
32 4
33 ],
34 "custom.params": []
35 },
36 "def": {
37 "struct.fields": [9 "name": "flipper",
38 {
39 "name": 5,10 "version": "3.0.0-rc1",
40 "type": 211 "authors": [
41 }12 "Parity Technologies <admin@parity.io>"
42 ]13 ]
43 }
44 },14 },
15 "spec": {
16 "constructors": [
45 {17 {
46 "id": {18 "args": [
19 {
47 "custom.name": 6,20 "name": "init_value",
21 "type": {
48 "custom.namespace": [22 "displayName": [
49 7,23 "bool"
50 8,
51 5
52 ],24 ],
53 "custom.params": [25 "type": 1
54 326 }
55 ]
56 },27 }
28 ],
57 "def": {29 "docs": [
58 "struct.fields": [30 " Creates a new flipper smart contract initialized with the given value."
59 {31 ],
60 "name": 9,32 "name": [
33 "new"
34 ],
61 "type": 435 "selector": "0xd183512b"
62 }
63 ]
64 }
65 },36 },
66 {
67 "id": "bool",
68 "def": "builtin"
69 },
70 {37 {
71 "id": {
72 "custom.name": 10,
73 "custom.namespace": [38 "args": [],
74 7,
75 8,
76 9,
77 11
78 ],
79 "custom.params": [39 "docs": [
80 340 " Creates a new flipper smart contract initialized to `false`."
81 ]41 ],
82 },
83 "def": {
84 "struct.fields": [
85 {
86 "name": 9,42 "name": [
43 "default"
44 ],
87 "type": 545 "selector": "0x6a3712e2"
88 }
89 ]
90 }
91 },46 }
92 {47 ],
93 "id": {
94 "custom.name": 12,
95 "custom.namespace": [48 "docs": [],
96 13
97 ],
98 "custom.params": []49 "events": [],
99 },
100 "def": {50 "messages": [
51 {
52 "args": [],
101 "tuple_struct.types": [53 "docs": [
102 654 " Flips the current value of the Flipper's bool."
103 ]55 ],
56 "mutates": true,
57 "name": [
58 "flip"
59 ],
60 "payable": false,
61 "returnType": null,
62 "selector": "0xc096a5f3"
104 }63 },
105 },64 {
106 {
107 "id": {
108 "array.len": 32,
109 "array.type": 7
110 },
111 "def": "builtin"
112 },
113 {
114 "id": "u8",
115 "def": "builtin"
116 }
117 ]
118 },
119 "storage": {65 "args": [],
120 "struct.type": 1,66 "docs": [
121 "struct.fields": [67 " Returns the current value of the Flipper's bool."
122 {68 ],
123 "name": 5,69 "mutates": false,
124 "layout": {
125 "struct.type": 2,70 "name": [
126 "struct.fields": [71 "get"
127 {72 ],
128 "name": 9,73 "payable": false,
129 "layout": {74 "returnType": {
130 "range.offset": "0x0000000000000000000000000000000000000000000000000000000000000000",75 "displayName": [
76 "bool"
77 ],
131 "range.len": 1,78 "type": 1
132 "range.elem_type": 3
133 }79 },
134 }
135 ]
136 }
137 }
138 ]
139 },
140 "contract": {
141 "name": 2,80 "selector": "0x1e5ca456"
81 }
82 ]
83 },
142 "constructors": [84 "storage": {
143 {
144 "name": 14,
145 "selector": "[\"0x5E\",\"0xBD\",\"0x88\",\"0xD6\"]",85 "struct": {
146 "args": [86 "fields": [
147 {87 {
148 "name": 15,88 "layout": {
149 "type": {89 "cell": {
150 "ty": 3,90 "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
151 "display_name": [91 "ty": 1
152 16
153 ]
154 }92 }
93 },
94 "name": "value"
155 }95 }
156 ],96 ]
157 "docs": [97 }
158 "Constructor that initializes the `bool` value to the given `init_value`."
159 ]
160 },98 },
161 {
162 "name": 17,
163 "selector": "[\"0x02\",\"0x22\",\"0xFF\",\"0x18\"]",
164 "args": [],
165 "docs": [
166 "Constructor that initializes the `bool` value to `false`.",
167 "",
168 "Constructors can delegate to other constructors."
169 ]
170 }
171 ],
172 "messages": [99 "types": [
173 {
174 "name": 18,
175 "selector": "[\"0x8C\",\"0x97\",\"0xDB\",\"0x39\"]",
176 "mutates": true,
177 "args": [],
178 "return_type": null,
179 "docs": [
180 "A message that can be called on instantiated contracts.",
181 "This one flips the value of the stored `bool` from `true`",
182 "to `false` and vice versa."
183 ]
184 },
185 {100 {
186 "name": 19,
187 "selector": "[\"0x25\",\"0x44\",\"0x4A\",\"0xFE\"]",
188 "mutates": false,
189 "args": [],
190 "return_type": {101 "def": {
191 "ty": 3,
192 "display_name": [102 "primitive": "bool"
193 16
194 ]
195 },103 }
196 "docs": [
197 "Simply returns the current value of our `bool`."
198 ]
199 }104 }
200 ],105 ]
201 "events": [],
202 "docs": []
203 }
204}106}