create-near-app 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/{common/contracts → contracts}/assemblyscript/README.md +1 -2
  2. package/{common/contracts → contracts}/assemblyscript/as-pect.config.js +0 -0
  3. package/{common/contracts → contracts}/assemblyscript/asconfig.json +0 -0
  4. package/{common/contracts → contracts}/assemblyscript/assembly/__tests__/as-pect.d.ts +0 -0
  5. package/contracts/assemblyscript/assembly/__tests__/main.spec.ts +11 -0
  6. package/{common/contracts → contracts}/assemblyscript/assembly/as_types.d.ts +0 -0
  7. package/contracts/assemblyscript/assembly/index.ts +23 -0
  8. package/{common/contracts → contracts}/assemblyscript/assembly/tsconfig.json +0 -0
  9. package/{common/contracts → contracts}/assemblyscript/package.json +2 -6
  10. package/{common/contracts → contracts}/rust/.cargo/config +0 -0
  11. package/{common/contracts → contracts}/rust/Cargo.toml +4 -5
  12. package/{common/contracts → contracts}/rust/README.md +1 -2
  13. package/contracts/rust/src/lib.rs +72 -0
  14. package/index.js +51 -71
  15. package/integration-tests/rs/Cargo.toml +22 -0
  16. package/integration-tests/rs/src/tests.rs +66 -0
  17. package/integration-tests/ts/ava.config.cjs +9 -0
  18. package/integration-tests/ts/package.json +16 -0
  19. package/integration-tests/ts/src/main.ava.ts +44 -0
  20. package/package.json +23 -24
  21. package/templates/react/README.md +2 -2
  22. package/templates/react/ava.config.cjs +9 -0
  23. package/templates/react/{src → frontend}/App.js +34 -29
  24. package/templates/react/{src → frontend}/__mocks__/fileMock.js +0 -0
  25. package/{common/frontend → templates/react/frontend/assets/css}/global.css +4 -3
  26. package/{common/frontend/assets → templates/react/frontend/assets/img}/favicon.ico +0 -0
  27. package/{common/frontend/assets → templates/react/frontend/assets/img}/logo-black.svg +0 -0
  28. package/{common/frontend/assets → templates/react/frontend/assets/img}/logo-white.svg +0 -0
  29. package/templates/react/{src → frontend/assets/js/near}/config.js +1 -1
  30. package/templates/{vue/src → react/frontend/assets/js/near}/utils.js +14 -4
  31. package/templates/react/{src → frontend}/index.html +3 -3
  32. package/templates/react/frontend/index.js +14 -0
  33. package/templates/react/near.gitignore +1 -1
  34. package/templates/react/package.json +29 -43
  35. package/templates/vanilla/README.md +2 -2
  36. package/templates/vanilla/frontend/assets/css/global.css +189 -0
  37. package/templates/vanilla/frontend/assets/img/favicon.ico +0 -0
  38. package/templates/vanilla/frontend/assets/img/logo-black.svg +1 -0
  39. package/templates/vanilla/frontend/assets/img/logo-white.svg +1 -0
  40. package/templates/vanilla/frontend/assets/js/index.js +74 -0
  41. package/templates/vanilla/{src → frontend/assets/js/near}/config.js +1 -1
  42. package/templates/{angular/src → vanilla/frontend/assets/js/near}/utils.js +14 -4
  43. package/templates/vanilla/{src → frontend}/index.html +22 -27
  44. package/templates/vanilla/near.gitignore +1 -1
  45. package/templates/vanilla/package.json +25 -31
  46. package/utils/rust-setup.js +1 -20
  47. package/utils/tracking.js +1 -2
  48. package/common/contracts/assemblyscript/assembly/__tests__/main.spec.ts +0 -9
  49. package/common/contracts/assemblyscript/assembly/index.ts +0 -40
  50. package/common/contracts/assemblyscript/compile.js +0 -50
  51. package/common/contracts/rust/Cargo.lock +0 -638
  52. package/common/contracts/rust/compile.js +0 -53
  53. package/common/contracts/rust/res/.gitkeep +0 -0
  54. package/common/contracts/rust/src/lib.rs +0 -121
  55. package/templates/angular/.gitpod.yml +0 -6
  56. package/templates/angular/README.md +0 -102
  57. package/templates/angular/angular.json +0 -126
  58. package/templates/angular/extra-webpack.config.ts +0 -7
  59. package/templates/angular/karma.conf.js +0 -40
  60. package/templates/angular/near.gitignore +0 -46
  61. package/templates/angular/neardev/shared-test/test.near.json +0 -1
  62. package/templates/angular/neardev/shared-test-staging/test.near.json +0 -1
  63. package/templates/angular/package.json +0 -63
  64. package/templates/angular/set-contract-name.js +0 -16
  65. package/templates/angular/src/app/app.component.html +0 -87
  66. package/templates/angular/src/app/app.component.spec.ts +0 -107
  67. package/templates/angular/src/app/app.component.ts +0 -88
  68. package/templates/angular/src/app/app.module.ts +0 -21
  69. package/templates/angular/src/app/components/notification/notification.component.html +0 -12
  70. package/templates/angular/src/app/components/notification/notification.component.spec.ts +0 -25
  71. package/templates/angular/src/app/components/notification/notification.component.ts +0 -23
  72. package/templates/angular/src/app/services/window.service.ts +0 -43
  73. package/templates/angular/src/config.d.ts +0 -13
  74. package/templates/angular/src/config.js +0 -62
  75. package/templates/angular/src/contract-name.js +0 -1
  76. package/templates/angular/src/environments/environment.prod.ts +0 -3
  77. package/templates/angular/src/environments/environment.ts +0 -16
  78. package/templates/angular/src/index.html +0 -15
  79. package/templates/angular/src/main.ts +0 -15
  80. package/templates/angular/src/polyfills.ts +0 -64
  81. package/templates/angular/src/styles.scss +0 -1
  82. package/templates/angular/src/test.ts +0 -25
  83. package/templates/angular/src/utils.d.ts +0 -3
  84. package/templates/angular/src/window.d.ts +0 -15
  85. package/templates/angular/tsconfig.app.json +0 -15
  86. package/templates/angular/tsconfig.json +0 -21
  87. package/templates/angular/tsconfig.spec.json +0 -18
  88. package/templates/angular/tslint.json +0 -149
  89. package/templates/react/babel.config.js +0 -3
  90. package/templates/react/neardev/shared-test-staging/test.near.json +0 -1
  91. package/templates/react/src/index.js +0 -13
  92. package/templates/react/src/jest.init.js +0 -1
  93. package/templates/react/src/main.test.js +0 -28
  94. package/templates/react/src/utils.js +0 -39
  95. package/templates/react/src/wallet/login/index.html +0 -28
  96. package/templates/vanilla/neardev/shared-test-staging/test.near.json +0 -1
  97. package/templates/vanilla/src/index.js +0 -113
  98. package/templates/vanilla/src/main.test.js +0 -15
  99. package/templates/vanilla/src/utils.js +0 -39
  100. package/templates/vanilla/src/wallet/login/index.html +0 -28
  101. package/templates/vue/.gitpod.yml +0 -6
  102. package/templates/vue/README.md +0 -101
  103. package/templates/vue/babel.config.js +0 -5
  104. package/templates/vue/copy-dev-account.js +0 -7
  105. package/templates/vue/jest.config.js +0 -7
  106. package/templates/vue/near.gitignore +0 -46
  107. package/templates/vue/neardev/shared-test/test.near.json +0 -1
  108. package/templates/vue/neardev/shared-test-staging/test.near.json +0 -1
  109. package/templates/vue/package.json +0 -86
  110. package/templates/vue/src/App.vue +0 -37
  111. package/templates/vue/src/components/Notification.vue +0 -38
  112. package/templates/vue/src/components/SignedIn.vue +0 -179
  113. package/templates/vue/src/components/SignedOut.vue +0 -34
  114. package/templates/vue/src/config.js +0 -63
  115. package/templates/vue/src/main.js +0 -16
  116. package/templates/vue/tests/unit/Notification.spec.js +0 -26
  117. package/templates/vue/tests/unit/SignedIn.spec.js +0 -24
  118. package/templates/vue/tests/unit/SignedOut.spec.js +0 -17
@@ -1,638 +0,0 @@
1
- # This file is automatically @generated by Cargo.
2
- # It is not intended for manual editing.
3
- [[package]]
4
- name = "Inflector"
5
- version = "0.11.4"
6
- source = "registry+https://github.com/rust-lang/crates.io-index"
7
- checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
8
-
9
- [[package]]
10
- name = "ahash"
11
- version = "0.4.7"
12
- source = "registry+https://github.com/rust-lang/crates.io-index"
13
- checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e"
14
-
15
- [[package]]
16
- name = "aho-corasick"
17
- version = "0.7.15"
18
- source = "registry+https://github.com/rust-lang/crates.io-index"
19
- checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
20
- dependencies = [
21
- "memchr",
22
- ]
23
-
24
- [[package]]
25
- name = "autocfg"
26
- version = "1.0.0"
27
- source = "registry+https://github.com/rust-lang/crates.io-index"
28
- checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
29
-
30
- [[package]]
31
- name = "base64"
32
- version = "0.13.0"
33
- source = "registry+https://github.com/rust-lang/crates.io-index"
34
- checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
35
-
36
- [[package]]
37
- name = "block-buffer"
38
- version = "0.7.3"
39
- source = "registry+https://github.com/rust-lang/crates.io-index"
40
- checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
41
- dependencies = [
42
- "block-padding",
43
- "byte-tools",
44
- "byteorder",
45
- "generic-array 0.12.3",
46
- ]
47
-
48
- [[package]]
49
- name = "block-buffer"
50
- version = "0.9.0"
51
- source = "registry+https://github.com/rust-lang/crates.io-index"
52
- checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
53
- dependencies = [
54
- "generic-array 0.14.4",
55
- ]
56
-
57
- [[package]]
58
- name = "block-padding"
59
- version = "0.1.5"
60
- source = "registry+https://github.com/rust-lang/crates.io-index"
61
- checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
62
- dependencies = [
63
- "byte-tools",
64
- ]
65
-
66
- [[package]]
67
- name = "borsh"
68
- version = "0.8.2"
69
- source = "registry+https://github.com/rust-lang/crates.io-index"
70
- checksum = "09a7111f797cc721407885a323fb071636aee57f750b1a4ddc27397eba168a74"
71
- dependencies = [
72
- "borsh-derive",
73
- "hashbrown 0.9.1",
74
- ]
75
-
76
- [[package]]
77
- name = "borsh-derive"
78
- version = "0.8.2"
79
- source = "registry+https://github.com/rust-lang/crates.io-index"
80
- checksum = "307f3740906bac2c118a8122fe22681232b244f1369273e45f1156b45c43d2dd"
81
- dependencies = [
82
- "borsh-derive-internal",
83
- "borsh-schema-derive-internal",
84
- "proc-macro-crate",
85
- "proc-macro2",
86
- "syn",
87
- ]
88
-
89
- [[package]]
90
- name = "borsh-derive-internal"
91
- version = "0.8.2"
92
- source = "registry+https://github.com/rust-lang/crates.io-index"
93
- checksum = "d2104c73179359431cc98e016998f2f23bc7a05bc53e79741bcba705f30047bc"
94
- dependencies = [
95
- "proc-macro2",
96
- "quote",
97
- "syn",
98
- ]
99
-
100
- [[package]]
101
- name = "borsh-schema-derive-internal"
102
- version = "0.8.2"
103
- source = "registry+https://github.com/rust-lang/crates.io-index"
104
- checksum = "ae29eb8418fcd46f723f8691a2ac06857d31179d33d2f2d91eb13967de97c728"
105
- dependencies = [
106
- "proc-macro2",
107
- "quote",
108
- "syn",
109
- ]
110
-
111
- [[package]]
112
- name = "bs58"
113
- version = "0.4.0"
114
- source = "registry+https://github.com/rust-lang/crates.io-index"
115
- checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3"
116
-
117
- [[package]]
118
- name = "byte-tools"
119
- version = "0.3.1"
120
- source = "registry+https://github.com/rust-lang/crates.io-index"
121
- checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
122
-
123
- [[package]]
124
- name = "byteorder"
125
- version = "1.3.4"
126
- source = "registry+https://github.com/rust-lang/crates.io-index"
127
- checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
128
-
129
- [[package]]
130
- name = "cfg-if"
131
- version = "0.1.10"
132
- source = "registry+https://github.com/rust-lang/crates.io-index"
133
- checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
134
-
135
- [[package]]
136
- name = "cfg-if"
137
- version = "1.0.0"
138
- source = "registry+https://github.com/rust-lang/crates.io-index"
139
- checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
140
-
141
- [[package]]
142
- name = "convert_case"
143
- version = "0.4.0"
144
- source = "registry+https://github.com/rust-lang/crates.io-index"
145
- checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
146
-
147
- [[package]]
148
- name = "cpuid-bool"
149
- version = "0.1.2"
150
- source = "registry+https://github.com/rust-lang/crates.io-index"
151
- checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"
152
-
153
- [[package]]
154
- name = "derive_more"
155
- version = "0.99.13"
156
- source = "registry+https://github.com/rust-lang/crates.io-index"
157
- checksum = "f82b1b72f1263f214c0f823371768776c4f5841b942c9883aa8e5ec584fd0ba6"
158
- dependencies = [
159
- "convert_case",
160
- "proc-macro2",
161
- "quote",
162
- "syn",
163
- ]
164
-
165
- [[package]]
166
- name = "digest"
167
- version = "0.8.1"
168
- source = "registry+https://github.com/rust-lang/crates.io-index"
169
- checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
170
- dependencies = [
171
- "generic-array 0.12.3",
172
- ]
173
-
174
- [[package]]
175
- name = "digest"
176
- version = "0.9.0"
177
- source = "registry+https://github.com/rust-lang/crates.io-index"
178
- checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
179
- dependencies = [
180
- "generic-array 0.14.4",
181
- ]
182
-
183
- [[package]]
184
- name = "generic-array"
185
- version = "0.12.3"
186
- source = "registry+https://github.com/rust-lang/crates.io-index"
187
- checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
188
- dependencies = [
189
- "typenum",
190
- ]
191
-
192
- [[package]]
193
- name = "generic-array"
194
- version = "0.14.4"
195
- source = "registry+https://github.com/rust-lang/crates.io-index"
196
- checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
197
- dependencies = [
198
- "typenum",
199
- "version_check",
200
- ]
201
-
202
- [[package]]
203
- name = "greeter"
204
- version = "0.1.0"
205
- dependencies = [
206
- "near-sdk",
207
- ]
208
-
209
- [[package]]
210
- name = "hashbrown"
211
- version = "0.8.1"
212
- source = "registry+https://github.com/rust-lang/crates.io-index"
213
- checksum = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb"
214
- dependencies = [
215
- "autocfg",
216
- ]
217
-
218
- [[package]]
219
- name = "hashbrown"
220
- version = "0.9.1"
221
- source = "registry+https://github.com/rust-lang/crates.io-index"
222
- checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
223
- dependencies = [
224
- "ahash",
225
- ]
226
-
227
- [[package]]
228
- name = "hex"
229
- version = "0.4.3"
230
- source = "registry+https://github.com/rust-lang/crates.io-index"
231
- checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
232
-
233
- [[package]]
234
- name = "indexmap"
235
- version = "1.5.0"
236
- source = "registry+https://github.com/rust-lang/crates.io-index"
237
- checksum = "5b88cd59ee5f71fea89a62248fc8f387d44400cefe05ef548466d61ced9029a7"
238
- dependencies = [
239
- "autocfg",
240
- "hashbrown 0.8.1",
241
- ]
242
-
243
- [[package]]
244
- name = "itoa"
245
- version = "0.4.6"
246
- source = "registry+https://github.com/rust-lang/crates.io-index"
247
- checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
248
-
249
- [[package]]
250
- name = "keccak"
251
- version = "0.1.0"
252
- source = "registry+https://github.com/rust-lang/crates.io-index"
253
- checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7"
254
-
255
- [[package]]
256
- name = "lazy_static"
257
- version = "1.4.0"
258
- source = "registry+https://github.com/rust-lang/crates.io-index"
259
- checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
260
-
261
- [[package]]
262
- name = "libc"
263
- version = "0.2.73"
264
- source = "registry+https://github.com/rust-lang/crates.io-index"
265
- checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9"
266
-
267
- [[package]]
268
- name = "memchr"
269
- version = "2.3.4"
270
- source = "registry+https://github.com/rust-lang/crates.io-index"
271
- checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
272
-
273
- [[package]]
274
- name = "memory_units"
275
- version = "0.4.0"
276
- source = "registry+https://github.com/rust-lang/crates.io-index"
277
- checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3"
278
-
279
- [[package]]
280
- name = "near-primitives-core"
281
- version = "0.4.0"
282
- source = "registry+https://github.com/rust-lang/crates.io-index"
283
- checksum = "c2b3fb5acf3a494aed4e848446ef2d6ebb47dbe91c681105d4d1786c2ee63e52"
284
- dependencies = [
285
- "base64",
286
- "borsh",
287
- "bs58",
288
- "derive_more",
289
- "hex",
290
- "lazy_static",
291
- "num-rational",
292
- "serde",
293
- "serde_json",
294
- "sha2",
295
- ]
296
-
297
- [[package]]
298
- name = "near-rpc-error-core"
299
- version = "0.1.0"
300
- source = "registry+https://github.com/rust-lang/crates.io-index"
301
- checksum = "ffa8dbf8437a28ac40fcb85859ab0d0b8385013935b000c7a51ae79631dd74d9"
302
- dependencies = [
303
- "proc-macro2",
304
- "quote",
305
- "serde",
306
- "serde_json",
307
- "syn",
308
- ]
309
-
310
- [[package]]
311
- name = "near-rpc-error-macro"
312
- version = "0.1.0"
313
- source = "registry+https://github.com/rust-lang/crates.io-index"
314
- checksum = "0c6111d713e90c7c551dee937f4a06cb9ea2672243455a4454cc7566387ba2d9"
315
- dependencies = [
316
- "near-rpc-error-core",
317
- "proc-macro2",
318
- "quote",
319
- "serde",
320
- "serde_json",
321
- "syn",
322
- ]
323
-
324
- [[package]]
325
- name = "near-runtime-utils"
326
- version = "4.0.0-pre.1"
327
- source = "registry+https://github.com/rust-lang/crates.io-index"
328
- checksum = "a48d80c4ca1d4cf99bc16490e1e3d49826c150dfc4410ac498918e45c7d98e07"
329
- dependencies = [
330
- "lazy_static",
331
- "regex",
332
- ]
333
-
334
- [[package]]
335
- name = "near-sdk"
336
- version = "3.1.0"
337
- source = "registry+https://github.com/rust-lang/crates.io-index"
338
- checksum = "c7383e242d3e07bf0951e8589d6eebd7f18bb1c1fc5fbec3fad796041a6aebd1"
339
- dependencies = [
340
- "base64",
341
- "borsh",
342
- "bs58",
343
- "near-primitives-core",
344
- "near-sdk-macros",
345
- "near-vm-logic",
346
- "serde",
347
- "serde_json",
348
- "wee_alloc",
349
- ]
350
-
351
- [[package]]
352
- name = "near-sdk-core"
353
- version = "3.1.0"
354
- source = "registry+https://github.com/rust-lang/crates.io-index"
355
- checksum = "284a78d9eb8eda58330462fa0023a6d7014c941df1f0387095e7dfd1dc0f2bce"
356
- dependencies = [
357
- "Inflector",
358
- "proc-macro2",
359
- "quote",
360
- "syn",
361
- ]
362
-
363
- [[package]]
364
- name = "near-sdk-macros"
365
- version = "3.1.0"
366
- source = "registry+https://github.com/rust-lang/crates.io-index"
367
- checksum = "2037337438f97d1ce5f7c896cf229dc56dacd5c01142d1ef95a7d778cde6ce7d"
368
- dependencies = [
369
- "near-sdk-core",
370
- "proc-macro2",
371
- "quote",
372
- "syn",
373
- ]
374
-
375
- [[package]]
376
- name = "near-vm-errors"
377
- version = "4.0.0-pre.1"
378
- source = "registry+https://github.com/rust-lang/crates.io-index"
379
- checksum = "e281d8730ed8cb0e3e69fb689acee6b93cdb43824cd69a8ffd7e1bfcbd1177d7"
380
- dependencies = [
381
- "borsh",
382
- "hex",
383
- "near-rpc-error-macro",
384
- "serde",
385
- ]
386
-
387
- [[package]]
388
- name = "near-vm-logic"
389
- version = "4.0.0-pre.1"
390
- source = "registry+https://github.com/rust-lang/crates.io-index"
391
- checksum = "e11cb28a2d07f37680efdaf860f4c9802828c44fc50c08009e7884de75d982c5"
392
- dependencies = [
393
- "base64",
394
- "borsh",
395
- "bs58",
396
- "byteorder",
397
- "near-primitives-core",
398
- "near-runtime-utils",
399
- "near-vm-errors",
400
- "serde",
401
- "sha2",
402
- "sha3",
403
- ]
404
-
405
- [[package]]
406
- name = "num-bigint"
407
- version = "0.3.2"
408
- source = "registry+https://github.com/rust-lang/crates.io-index"
409
- checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba"
410
- dependencies = [
411
- "autocfg",
412
- "num-integer",
413
- "num-traits",
414
- ]
415
-
416
- [[package]]
417
- name = "num-integer"
418
- version = "0.1.43"
419
- source = "registry+https://github.com/rust-lang/crates.io-index"
420
- checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b"
421
- dependencies = [
422
- "autocfg",
423
- "num-traits",
424
- ]
425
-
426
- [[package]]
427
- name = "num-rational"
428
- version = "0.3.2"
429
- source = "registry+https://github.com/rust-lang/crates.io-index"
430
- checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
431
- dependencies = [
432
- "autocfg",
433
- "num-bigint",
434
- "num-integer",
435
- "num-traits",
436
- "serde",
437
- ]
438
-
439
- [[package]]
440
- name = "num-traits"
441
- version = "0.2.12"
442
- source = "registry+https://github.com/rust-lang/crates.io-index"
443
- checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611"
444
- dependencies = [
445
- "autocfg",
446
- ]
447
-
448
- [[package]]
449
- name = "opaque-debug"
450
- version = "0.2.3"
451
- source = "registry+https://github.com/rust-lang/crates.io-index"
452
- checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
453
-
454
- [[package]]
455
- name = "opaque-debug"
456
- version = "0.3.0"
457
- source = "registry+https://github.com/rust-lang/crates.io-index"
458
- checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
459
-
460
- [[package]]
461
- name = "proc-macro-crate"
462
- version = "0.1.5"
463
- source = "registry+https://github.com/rust-lang/crates.io-index"
464
- checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
465
- dependencies = [
466
- "toml",
467
- ]
468
-
469
- [[package]]
470
- name = "proc-macro2"
471
- version = "1.0.24"
472
- source = "registry+https://github.com/rust-lang/crates.io-index"
473
- checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
474
- dependencies = [
475
- "unicode-xid",
476
- ]
477
-
478
- [[package]]
479
- name = "quote"
480
- version = "1.0.7"
481
- source = "registry+https://github.com/rust-lang/crates.io-index"
482
- checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
483
- dependencies = [
484
- "proc-macro2",
485
- ]
486
-
487
- [[package]]
488
- name = "regex"
489
- version = "1.4.5"
490
- source = "registry+https://github.com/rust-lang/crates.io-index"
491
- checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19"
492
- dependencies = [
493
- "aho-corasick",
494
- "memchr",
495
- "regex-syntax",
496
- ]
497
-
498
- [[package]]
499
- name = "regex-syntax"
500
- version = "0.6.23"
501
- source = "registry+https://github.com/rust-lang/crates.io-index"
502
- checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548"
503
-
504
- [[package]]
505
- name = "ryu"
506
- version = "1.0.5"
507
- source = "registry+https://github.com/rust-lang/crates.io-index"
508
- checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
509
-
510
- [[package]]
511
- name = "serde"
512
- version = "1.0.114"
513
- source = "registry+https://github.com/rust-lang/crates.io-index"
514
- checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3"
515
- dependencies = [
516
- "serde_derive",
517
- ]
518
-
519
- [[package]]
520
- name = "serde_derive"
521
- version = "1.0.114"
522
- source = "registry+https://github.com/rust-lang/crates.io-index"
523
- checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e"
524
- dependencies = [
525
- "proc-macro2",
526
- "quote",
527
- "syn",
528
- ]
529
-
530
- [[package]]
531
- name = "serde_json"
532
- version = "1.0.56"
533
- source = "registry+https://github.com/rust-lang/crates.io-index"
534
- checksum = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3"
535
- dependencies = [
536
- "indexmap",
537
- "itoa",
538
- "ryu",
539
- "serde",
540
- ]
541
-
542
- [[package]]
543
- name = "sha2"
544
- version = "0.9.3"
545
- source = "registry+https://github.com/rust-lang/crates.io-index"
546
- checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de"
547
- dependencies = [
548
- "block-buffer 0.9.0",
549
- "cfg-if 1.0.0",
550
- "cpuid-bool",
551
- "digest 0.9.0",
552
- "opaque-debug 0.3.0",
553
- ]
554
-
555
- [[package]]
556
- name = "sha3"
557
- version = "0.8.2"
558
- source = "registry+https://github.com/rust-lang/crates.io-index"
559
- checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf"
560
- dependencies = [
561
- "block-buffer 0.7.3",
562
- "byte-tools",
563
- "digest 0.8.1",
564
- "keccak",
565
- "opaque-debug 0.2.3",
566
- ]
567
-
568
- [[package]]
569
- name = "syn"
570
- version = "1.0.57"
571
- source = "registry+https://github.com/rust-lang/crates.io-index"
572
- checksum = "4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e6"
573
- dependencies = [
574
- "proc-macro2",
575
- "quote",
576
- "unicode-xid",
577
- ]
578
-
579
- [[package]]
580
- name = "toml"
581
- version = "0.5.8"
582
- source = "registry+https://github.com/rust-lang/crates.io-index"
583
- checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
584
- dependencies = [
585
- "serde",
586
- ]
587
-
588
- [[package]]
589
- name = "typenum"
590
- version = "1.12.0"
591
- source = "registry+https://github.com/rust-lang/crates.io-index"
592
- checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
593
-
594
- [[package]]
595
- name = "unicode-xid"
596
- version = "0.2.1"
597
- source = "registry+https://github.com/rust-lang/crates.io-index"
598
- checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
599
-
600
- [[package]]
601
- name = "version_check"
602
- version = "0.9.3"
603
- source = "registry+https://github.com/rust-lang/crates.io-index"
604
- checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
605
-
606
- [[package]]
607
- name = "wee_alloc"
608
- version = "0.4.5"
609
- source = "registry+https://github.com/rust-lang/crates.io-index"
610
- checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e"
611
- dependencies = [
612
- "cfg-if 0.1.10",
613
- "libc",
614
- "memory_units",
615
- "winapi",
616
- ]
617
-
618
- [[package]]
619
- name = "winapi"
620
- version = "0.3.9"
621
- source = "registry+https://github.com/rust-lang/crates.io-index"
622
- checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
623
- dependencies = [
624
- "winapi-i686-pc-windows-gnu",
625
- "winapi-x86_64-pc-windows-gnu",
626
- ]
627
-
628
- [[package]]
629
- name = "winapi-i686-pc-windows-gnu"
630
- version = "0.4.0"
631
- source = "registry+https://github.com/rust-lang/crates.io-index"
632
- checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
633
-
634
- [[package]]
635
- name = "winapi-x86_64-pc-windows-gnu"
636
- version = "0.4.0"
637
- source = "registry+https://github.com/rust-lang/crates.io-index"
638
- checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
@@ -1,53 +0,0 @@
1
- // This file does two things:
2
- //
3
- // 1. Compile the Rust contract using cargo (see buildCmd below). This will
4
- // create a wasm file in the 'build' folder.
5
- // 2. Create a symbolic link (symlink) to the generated wasm file in the root
6
- // project's `out` folder, for easy use with near-cli.
7
- //
8
- // First, import some helper libraries. `shelljs` is included in the
9
- // devDependencies of the root project, which is why it's available here. It
10
- // makes it easy to use *NIX-style scripting (which works on Linux distros,
11
- // macOS, and Unix systems) on Windows as well.
12
- const sh = require('shelljs')
13
-
14
- // Figure out which directory the user called this script from, which we'll use
15
- // later to set up the symlink.
16
- const calledFromDir = sh.pwd().toString()
17
-
18
- // For the duration of this script, we want to operate from within the
19
- // Rust project's folder. Let's change into that directory.
20
- sh.cd(__dirname)
21
-
22
- // You can call this script with `node compile.js` or `node compile.js
23
- // --debug`. Let's set a variable to track whether `--debug` was used.
24
- const debug = process.argv.pop() === '--debug'
25
-
26
- // You can call this script with `node compile.js` or `node compile.js --debug`.
27
- // Let's set a variable to track whether `--debug` was used.
28
- // Note: see other flags in ./cargo/config. Unfortunately, you cannot set the
29
- // `--target option` in Cargo.toml.
30
- const buildCmd = debug
31
- ? 'cargo build --target wasm32-unknown-unknown'
32
- : 'cargo build --target wasm32-unknown-unknown --release'
33
-
34
- // Execute the build command, storing exit code for later use
35
- const { code } = sh.exec(buildCmd)
36
-
37
- // Assuming this is compiled from the root project directory, link the compiled
38
- // contract to the `out` folder –
39
- // When running commands like `near deploy`, near-cli looks for a contract at
40
- // <CURRENT_DIRECTORY>/out/main.wasm
41
- if (code === 0 && calledFromDir !== __dirname) {
42
- const linkDir = `${calledFromDir}/out`
43
- const link = `${calledFromDir}/out/main.wasm`
44
- const packageName = require('fs').readFileSync(`${__dirname}/Cargo.toml`).toString().match(/name = "([^"]+)"/)[1]
45
- const outFile = `./target/wasm32-unknown-unknown/${debug ? 'debug' : 'release'}/${packageName}.wasm`
46
- sh.mkdir('-p', linkDir)
47
- sh.rm('-f', link)
48
- //fixes #831: copy-update instead of linking .- sometimes sh.ln does not work on Windows
49
- sh.cp('-u',outFile,link)
50
- }
51
-
52
- // exit script with the same code as the build command
53
- process.exit(code)
File without changes