osbc 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. checksums.yaml +7 -0
  2. data/.env +5 -0
  3. data/.rspec +1 -0
  4. data/.rubocop.yml +273 -0
  5. data/.ruby-version +1 -0
  6. data/CHANGELOG.md +5 -0
  7. data/CODE_OF_CONDUCT.md +84 -0
  8. data/Dockerfile +17 -0
  9. data/Gemfile +109 -0
  10. data/Gemfile.lock +343 -0
  11. data/LICENSE.md +21 -0
  12. data/LICENSE.txt +21 -0
  13. data/Procfile +3 -0
  14. data/Procfile.dev +2 -0
  15. data/README.md +185 -0
  16. data/Rakefile +6 -0
  17. data/app/assets/builds/.keep +0 -0
  18. data/app/assets/config/manifest.js +5 -0
  19. data/app/assets/images/.keep +0 -0
  20. data/app/assets/images/bg.png +0 -0
  21. data/app/assets/images/gimage.png +0 -0
  22. data/app/assets/images/image.png +0 -0
  23. data/app/assets/images/logo.png +0 -0
  24. data/app/assets/images/outerspc.jpg +0 -0
  25. data/app/assets/images/proxy.jpg +0 -0
  26. data/app/assets/images/space.jpg +0 -0
  27. data/app/assets/images/space_four.jpg +0 -0
  28. data/app/assets/images/space_t.jpg +0 -0
  29. data/app/assets/images/space_th.jpg +0 -0
  30. data/app/assets/images/space_two.jpg +0 -0
  31. data/app/assets/images/th.jpg +0 -0
  32. data/app/assets/stylesheets/application.css +344 -0
  33. data/app/assets/stylesheets/application.tailwind.css +13 -0
  34. data/app/assets/stylesheets/home.css +0 -0
  35. data/app/channels/application_cable/channel.rb +6 -0
  36. data/app/channels/application_cable/connection.rb +6 -0
  37. data/app/controllers/api/v1/block_confirmations_controller.rb +65 -0
  38. data/app/controllers/application_controller.rb +72 -0
  39. data/app/controllers/blocks_controller.rb +20 -0
  40. data/app/controllers/chains_controller.rb +72 -0
  41. data/app/controllers/concerns/.keep +0 -0
  42. data/app/controllers/contracts_controller.rb +25 -0
  43. data/app/controllers/pools_controller.rb +73 -0
  44. data/app/controllers/signatures_controller.rb +25 -0
  45. data/app/controllers/tickets_controller.rb +76 -0
  46. data/app/controllers/transactions_controller.rb +48 -0
  47. data/app/controllers/users/confirmations_controller.rb +30 -0
  48. data/app/controllers/users/omniauth_callbacks_controller.rb +30 -0
  49. data/app/controllers/users/passwords_controller.rb +34 -0
  50. data/app/controllers/users/registrations_controller.rb +61 -0
  51. data/app/controllers/users/sessions_controller.rb +27 -0
  52. data/app/controllers/users/unlocks_controller.rb +30 -0
  53. data/app/controllers/wallets_controller.rb +18 -0
  54. data/app/helpers/application_helper.rb +4 -0
  55. data/app/helpers/blocks_helper.rb +4 -0
  56. data/app/helpers/chains_helper.rb +4 -0
  57. data/app/helpers/contracts_helper.rb +4 -0
  58. data/app/helpers/pools_helper.rb +4 -0
  59. data/app/helpers/signatures_helper.rb +4 -0
  60. data/app/helpers/tickets_helper.rb +4 -0
  61. data/app/helpers/transactions_helper.rb +4 -0
  62. data/app/helpers/wallets_helper.rb +4 -0
  63. data/app/javascript/application.js +3 -0
  64. data/app/javascript/controllers/application.js +9 -0
  65. data/app/javascript/controllers/hello_controller.js +7 -0
  66. data/app/javascript/controllers/index.js +11 -0
  67. data/app/jobs/application_job.rb +9 -0
  68. data/app/mailers/application_mailer.rb +6 -0
  69. data/app/models/acceptable_number_sequence.rb +4 -0
  70. data/app/models/acceptable_symbol_sequence.rb +4 -0
  71. data/app/models/acceptable_word.rb +4 -0
  72. data/app/models/application_record.rb +5 -0
  73. data/app/models/block.rb +17 -0
  74. data/app/models/chain.rb +10 -0
  75. data/app/models/concerns/.keep +0 -0
  76. data/app/models/concerns/sequences_validator.rb +30 -0
  77. data/app/models/concerns/wallet_exists_validator.rb +13 -0
  78. data/app/models/contract.rb +7 -0
  79. data/app/models/pool.rb +5 -0
  80. data/app/models/signature.rb +12 -0
  81. data/app/models/ticket.rb +11 -0
  82. data/app/models/transaction.rb +25 -0
  83. data/app/models/user.rb +44 -0
  84. data/app/models/wallet.rb +33 -0
  85. data/app/services/application_service.rb +23 -0
  86. data/app/services/assign_contracts_service.rb +162 -0
  87. data/app/services/create_ticket_service.rb +87 -0
  88. data/app/services/create_wallet_service.rb +20 -0
  89. data/app/services/transaction_to_block_service.rb +62 -0
  90. data/app/views/application/_featured_board.html.erb +77 -0
  91. data/app/views/application/home.html.slim +1 -0
  92. data/app/views/application/mining_profile.html.slim +59 -0
  93. data/app/views/application/privacy_policy.html.erb +0 -0
  94. data/app/views/application/terms.html.erb +0 -0
  95. data/app/views/blocks/_block.html.slim +13 -0
  96. data/app/views/blocks/_block.json.jbuilder +4 -0
  97. data/app/views/blocks/_form.html.slim +26 -0
  98. data/app/views/blocks/edit.html.slim +10 -0
  99. data/app/views/blocks/index.html.slim +12 -0
  100. data/app/views/blocks/index.json.jbuilder +3 -0
  101. data/app/views/blocks/new.html.slim +8 -0
  102. data/app/views/blocks/show.html.slim +8 -0
  103. data/app/views/blocks/show.json.jbuilder +3 -0
  104. data/app/views/chains/_chain.html.slim +16 -0
  105. data/app/views/chains/_chain.json.jbuilder +4 -0
  106. data/app/views/chains/_form.html.slim +30 -0
  107. data/app/views/chains/edit.html.slim +10 -0
  108. data/app/views/chains/index.html.slim +11 -0
  109. data/app/views/chains/index.json.jbuilder +3 -0
  110. data/app/views/chains/new.html.slim +8 -0
  111. data/app/views/chains/show.html.slim +10 -0
  112. data/app/views/chains/show.json.jbuilder +3 -0
  113. data/app/views/contracts/_contract.html.slim +8 -0
  114. data/app/views/contracts/_contract.json.jbuilder +4 -0
  115. data/app/views/contracts/_form.html.slim +34 -0
  116. data/app/views/contracts/edit.html.slim +10 -0
  117. data/app/views/contracts/index.html.slim +12 -0
  118. data/app/views/contracts/index.json.jbuilder +3 -0
  119. data/app/views/contracts/new.html.slim +8 -0
  120. data/app/views/contracts/show.html.slim +8 -0
  121. data/app/views/contracts/show.json.jbuilder +3 -0
  122. data/app/views/layouts/_alert.html.slim +6 -0
  123. data/app/views/layouts/_navbar.html.slim +27 -0
  124. data/app/views/layouts/_notice.html.slim +6 -0
  125. data/app/views/layouts/application.html.erb +32 -0
  126. data/app/views/layouts/mailer.html.erb +13 -0
  127. data/app/views/layouts/mailer.text.erb +1 -0
  128. data/app/views/pools/_form.html.slim +30 -0
  129. data/app/views/pools/_pool.html.slim +16 -0
  130. data/app/views/pools/_pool.json.jbuilder +4 -0
  131. data/app/views/pools/edit.html.slim +10 -0
  132. data/app/views/pools/index.html.slim +12 -0
  133. data/app/views/pools/index.json.jbuilder +3 -0
  134. data/app/views/pools/new.html.slim +8 -0
  135. data/app/views/pools/show.html.slim +8 -0
  136. data/app/views/pools/show.json.jbuilder +3 -0
  137. data/app/views/signatures/_form.html.slim +46 -0
  138. data/app/views/signatures/_signature.html.slim +28 -0
  139. data/app/views/signatures/_signature.json.jbuilder +4 -0
  140. data/app/views/signatures/edit.html.slim +10 -0
  141. data/app/views/signatures/index.html.slim +10 -0
  142. data/app/views/signatures/index.json.jbuilder +3 -0
  143. data/app/views/signatures/new.html.slim +8 -0
  144. data/app/views/signatures/show.html.slim +10 -0
  145. data/app/views/signatures/show.json.jbuilder +3 -0
  146. data/app/views/tickets/_form.html.slim +26 -0
  147. data/app/views/tickets/_ticket.html.slim +10 -0
  148. data/app/views/tickets/_ticket.json.jbuilder +4 -0
  149. data/app/views/tickets/edit.html.slim +10 -0
  150. data/app/views/tickets/index.html.slim +16 -0
  151. data/app/views/tickets/index.json.jbuilder +3 -0
  152. data/app/views/tickets/new.html.slim +10 -0
  153. data/app/views/tickets/show.html.slim +8 -0
  154. data/app/views/tickets/show.json.jbuilder +3 -0
  155. data/app/views/transactions/_form.html.slim +16 -0
  156. data/app/views/transactions/_transaction.html.slim +24 -0
  157. data/app/views/transactions/_transaction.json.jbuilder +4 -0
  158. data/app/views/transactions/edit.html.slim +10 -0
  159. data/app/views/transactions/index.html.slim +19 -0
  160. data/app/views/transactions/index.json.jbuilder +3 -0
  161. data/app/views/transactions/new.html.slim +9 -0
  162. data/app/views/transactions/show.html.slim +8 -0
  163. data/app/views/transactions/show.json.jbuilder +3 -0
  164. data/app/views/users/confirmations/new.html.erb +16 -0
  165. data/app/views/users/mailer/confirmation_instructions.html.erb +5 -0
  166. data/app/views/users/mailer/email_changed.html.erb +7 -0
  167. data/app/views/users/mailer/password_change.html.erb +3 -0
  168. data/app/views/users/mailer/reset_password_instructions.html.erb +8 -0
  169. data/app/views/users/mailer/unlock_instructions.html.erb +7 -0
  170. data/app/views/users/passwords/edit.html.erb +25 -0
  171. data/app/views/users/passwords/new.html.erb +16 -0
  172. data/app/views/users/registrations/edit.html.erb +43 -0
  173. data/app/views/users/registrations/new.html.erb +37 -0
  174. data/app/views/users/sessions/new.html.erb +30 -0
  175. data/app/views/users/shared/_error_messages.html.erb +15 -0
  176. data/app/views/users/shared/_links.html.erb +25 -0
  177. data/app/views/users/unlocks/new.html.erb +16 -0
  178. data/app/views/wallets/_form.html.slim +30 -0
  179. data/app/views/wallets/_wallet.html.slim +13 -0
  180. data/app/views/wallets/_wallet.json.jbuilder +4 -0
  181. data/app/views/wallets/edit.html.slim +10 -0
  182. data/app/views/wallets/index.html.slim +18 -0
  183. data/app/views/wallets/index.json.jbuilder +3 -0
  184. data/app/views/wallets/new.html.slim +8 -0
  185. data/app/views/wallets/show.html.slim +11 -0
  186. data/app/views/wallets/show.json.jbuilder +3 -0
  187. data/app/workers/application_worker.rb +82 -0
  188. data/app/workers/assign_contract_worker.rb +27 -0
  189. data/app/workers/create_ticket_worker.rb +23 -0
  190. data/app/workers/create_wallet_worker.rb +21 -0
  191. data/app/workers/transaction_to_block_worker.rb +48 -0
  192. data/bin/bundle +114 -0
  193. data/bin/console +15 -0
  194. data/bin/dev +9 -0
  195. data/bin/importmap +5 -0
  196. data/bin/osbc +77 -0
  197. data/bin/rails +6 -0
  198. data/bin/rake +6 -0
  199. data/bin/setup +35 -0
  200. data/config/application.rb +25 -0
  201. data/config/boot.rb +6 -0
  202. data/config/cable.yml +10 -0
  203. data/config/credentials.yml.enc +1 -0
  204. data/config/database.yml +21 -0
  205. data/config/environment.rb +7 -0
  206. data/config/environments/development.rb +73 -0
  207. data/config/environments/production.rb +95 -0
  208. data/config/environments/test.rb +62 -0
  209. data/config/importmap.rb +9 -0
  210. data/config/initializers/assets.rb +14 -0
  211. data/config/initializers/content_security_policy.rb +26 -0
  212. data/config/initializers/devise.rb +311 -0
  213. data/config/initializers/filter_parameter_logging.rb +10 -0
  214. data/config/initializers/inflections.rb +17 -0
  215. data/config/initializers/permissions_policy.rb +12 -0
  216. data/config/locales/devise.en.yml +65 -0
  217. data/config/locales/en.yml +33 -0
  218. data/config/puma.rb +45 -0
  219. data/config/routes/api.rb +9 -0
  220. data/config/routes.rb +30 -0
  221. data/config/sidekiq.yml +10 -0
  222. data/config/storage.yml +34 -0
  223. data/config/tailwind.config.js +23 -0
  224. data/config.ru +8 -0
  225. data/coverage/.last_run.json +5 -0
  226. data/coverage/.resultset.json +1853 -0
  227. data/coverage/.resultset.json.lock +0 -0
  228. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc.png +0 -0
  229. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
  230. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_both.png +0 -0
  231. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc.png +0 -0
  232. data/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
  233. data/coverage/assets/0.12.3/application.css +1 -0
  234. data/coverage/assets/0.12.3/application.js +7 -0
  235. data/coverage/assets/0.12.3/colorbox/border.png +0 -0
  236. data/coverage/assets/0.12.3/colorbox/controls.png +0 -0
  237. data/coverage/assets/0.12.3/colorbox/loading.gif +0 -0
  238. data/coverage/assets/0.12.3/colorbox/loading_background.png +0 -0
  239. data/coverage/assets/0.12.3/favicon_green.png +0 -0
  240. data/coverage/assets/0.12.3/favicon_red.png +0 -0
  241. data/coverage/assets/0.12.3/favicon_yellow.png +0 -0
  242. data/coverage/assets/0.12.3/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  243. data/coverage/assets/0.12.3/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  244. data/coverage/assets/0.12.3/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  245. data/coverage/assets/0.12.3/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  246. data/coverage/assets/0.12.3/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  247. data/coverage/assets/0.12.3/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  248. data/coverage/assets/0.12.3/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  249. data/coverage/assets/0.12.3/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  250. data/coverage/assets/0.12.3/images/ui-icons_222222_256x240.png +0 -0
  251. data/coverage/assets/0.12.3/images/ui-icons_2e83ff_256x240.png +0 -0
  252. data/coverage/assets/0.12.3/images/ui-icons_454545_256x240.png +0 -0
  253. data/coverage/assets/0.12.3/images/ui-icons_888888_256x240.png +0 -0
  254. data/coverage/assets/0.12.3/images/ui-icons_cd0a0a_256x240.png +0 -0
  255. data/coverage/assets/0.12.3/loading.gif +0 -0
  256. data/coverage/assets/0.12.3/magnify.png +0 -0
  257. data/coverage/index.html +20731 -0
  258. data/db/migrate/20221018053949_devise_create_users.rb +45 -0
  259. data/db/migrate/20221019002956_create_chains.rb +13 -0
  260. data/db/migrate/20221020112137_create_blocks.rb +12 -0
  261. data/db/migrate/20221020123102_add_chain_to_blocks.rb +5 -0
  262. data/db/migrate/20221020150504_create_wallets.rb +13 -0
  263. data/db/migrate/20221022221059_create_transactions.rb +20 -0
  264. data/db/migrate/20221023011005_add_block_to_transactions.rb +5 -0
  265. data/db/migrate/20221023014707_create_contracts.rb +11 -0
  266. data/db/migrate/20221023040749_create_pools.rb +13 -0
  267. data/db/migrate/20221023041015_create_tickets.rb +11 -0
  268. data/db/migrate/20221023103509_add_contracts_count_to_block.rb +6 -0
  269. data/db/migrate/20221023110613_add_acceptable_word_list_to_users.rb +7 -0
  270. data/db/migrate/20221023113539_create_signatures.rb +19 -0
  271. data/db/migrate/20221023113750_create_acceptable_words.rb +9 -0
  272. data/db/migrate/20221023114152_create_acceptable_number_sequences.rb +9 -0
  273. data/db/migrate/20221023114203_create_acceptable_symbol_sequences.rb +9 -0
  274. data/db/migrate/20221023114324_add_user_acceptable_hash_to_tickets.rb +7 -0
  275. data/db/migrate/20221023114408_add_time_ref_to_tickets.rb +5 -0
  276. data/db/migrate/20221024125047_add_master_hash_to_blocks.rb +5 -0
  277. data/db/migrate/20221109161845_add_transactions_count_to_blocks.rb +5 -0
  278. data/db/migrate/20221117135003_add_balance_to_chains.rb +5 -0
  279. data/db/migrate/20221117203417_add_transaction_id_list_to_tickets.rb +5 -0
  280. data/db/migrate/20221118080357_add_api_keys_to_users.rb +6 -0
  281. data/db/schema.rb +179 -0
  282. data/db/seeds.rb +134 -0
  283. data/docker-compose.yml +53 -0
  284. data/entrypoint.sh +8 -0
  285. data/lib/assets/.keep +0 -0
  286. data/lib/osbc/osbc.rb +9 -0
  287. data/lib/outerspace/blockchain/version.rb +7 -0
  288. data/lib/outerspace/blockchain.rb +10 -0
  289. data/lib/tasks/.keep +0 -0
  290. data/lib/tasks/compose.rake +92 -0
  291. data/lib/tasks/compose_db.rake +71 -0
  292. data/lib/tasks/compose_logs.rake +95 -0
  293. data/lib/tasks/compose_test.rake +62 -0
  294. data/log/.keep +0 -0
  295. data/mining_concept.ipynb +284 -0
  296. data/outerspace-blockchain.gemspec +50 -0
  297. data/public/404.html +67 -0
  298. data/public/422.html +67 -0
  299. data/public/500.html +66 -0
  300. data/public/apple-touch-icon-precomposed.png +0 -0
  301. data/public/apple-touch-icon.png +0 -0
  302. data/public/favicon.ico +0 -0
  303. data/public/robots.txt +1 -0
  304. data/storage/.keep +0 -0
  305. data/tmp/.keep +0 -0
  306. data/tmp/pids/.keep +0 -0
  307. data/tmp/storage/.keep +0 -0
  308. data/vendor/.keep +0 -0
  309. data/vendor/javascript/.keep +0 -0
  310. metadata +643 -0
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Define an application-wide content security policy.
5
+ # See the Securing Rails Applications Guide for more information:
6
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
7
+
8
+ # Rails.application.configure do
9
+ # config.content_security_policy do |policy|
10
+ # policy.default_src :self, :https
11
+ # policy.font_src :self, :https, :data
12
+ # policy.img_src :self, :https, :data
13
+ # policy.object_src :none
14
+ # policy.script_src :self, :https
15
+ # policy.style_src :self, :https
16
+ # # Specify URI for violation reports
17
+ # # policy.report_uri "/csp-violation-report-endpoint"
18
+ # end
19
+ #
20
+ # # Generate session nonces for permitted importmap and inline scripts
21
+ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
22
+ # config.content_security_policy_nonce_directives = %w(script-src)
23
+ #
24
+ # # Report violations without enforcing the policy.
25
+ # # config.content_security_policy_report_only = true
26
+ # end
@@ -0,0 +1,311 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Assuming you have not yet modified this file, each configuration option below
4
+ # is set to its default value. Note that some are commented out while others
5
+ # are not: uncommented lines are intended to protect your configuration from
6
+ # breaking changes in upgrades (i.e., in the event that future versions of
7
+ # Devise change the default values for those options).
8
+ #
9
+ # Use this hook to configure devise mailer, warden hooks and so forth.
10
+ # Many of these configuration options can be set straight in your model.
11
+ Devise.setup do |config|
12
+ # The secret key used by Devise. Devise uses this key to generate
13
+ # random tokens. Changing this key will render invalid all existing
14
+ # confirmation, reset password and unlock tokens in the database.
15
+ # Devise will use the `secret_key_base` as its `secret_key`
16
+ # by default. You can change it below and use your own secret key.
17
+ # config.secret_key = 'e77f993958e397631674f4d71c6b7b636ec6599915261606ae7d842e44c0c39b07c3a0661eb8d2c21e76364ed8daff8ceec8cb3b15f96e3861c5ee3873235b8f'
18
+
19
+ # ==> Controller configuration
20
+ # Configure the parent class to the devise controllers.
21
+ # config.parent_controller = 'DeviseController'
22
+
23
+ # ==> Mailer Configuration
24
+ # Configure the e-mail address which will be shown in Devise::Mailer,
25
+ # note that it will be overwritten if you use your own mailer class
26
+ # with default "from" parameter.
27
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
28
+
29
+ # Configure the class responsible to send e-mails.
30
+ # config.mailer = 'Devise::Mailer'
31
+
32
+ # Configure the parent class responsible to send e-mails.
33
+ # config.parent_mailer = 'ActionMailer::Base'
34
+
35
+ # ==> ORM configuration
36
+ # Load and configure the ORM. Supports :active_record (default) and
37
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
38
+ # available as additional gems.
39
+ require "devise/orm/active_record"
40
+
41
+ # ==> Configuration for any authentication mechanism
42
+ # Configure which keys are used when authenticating a user. The default is
43
+ # just :email. You can configure it to use [:username, :subdomain], so for
44
+ # authenticating a user, both parameters are required. Remember that those
45
+ # parameters are used only when authenticating and not when retrieving from
46
+ # session. If you need permissions, you should implement that in a before filter.
47
+ # You can also supply a hash where the value is a boolean determining whether
48
+ # or not authentication should be aborted when the value is not present.
49
+ # config.authentication_keys = [:email]
50
+
51
+ # Configure parameters from the request object used for authentication. Each entry
52
+ # given should be a request method and it will automatically be passed to the
53
+ # find_for_authentication method and considered in your model lookup. For instance,
54
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
55
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
56
+ # config.request_keys = []
57
+
58
+ # Configure which authentication keys should be case-insensitive.
59
+ # These keys will be downcased upon creating or modifying a user and when used
60
+ # to authenticate or find a user. Default is :email.
61
+ config.case_insensitive_keys = [:email]
62
+
63
+ # Configure which authentication keys should have whitespace stripped.
64
+ # These keys will have whitespace before and after removed upon creating or
65
+ # modifying a user and when used to authenticate or find a user. Default is :email.
66
+ config.strip_whitespace_keys = [:email]
67
+
68
+ # Tell if authentication through request.params is enabled. True by default.
69
+ # It can be set to an array that will enable params authentication only for the
70
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
71
+ # enable it only for database (email + password) authentication.
72
+ # config.params_authenticatable = true
73
+
74
+ # Tell if authentication through HTTP Auth is enabled. False by default.
75
+ # It can be set to an array that will enable http authentication only for the
76
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
77
+ # enable it only for database authentication.
78
+ # For API-only applications to support authentication "out-of-the-box", you will likely want to
79
+ # enable this with :database unless you are using a custom strategy.
80
+ # The supported strategies are:
81
+ # :database = Support basic authentication with authentication key + password
82
+ # config.http_authenticatable = false
83
+
84
+ # If 401 status code should be returned for AJAX requests. True by default.
85
+ # config.http_authenticatable_on_xhr = true
86
+
87
+ # The realm used in Http Basic Authentication. 'Application' by default.
88
+ # config.http_authentication_realm = 'Application'
89
+
90
+ # It will change confirmation, password recovery and other workflows
91
+ # to behave the same regardless if the e-mail provided was right or wrong.
92
+ # Does not affect registerable.
93
+ # config.paranoid = true
94
+
95
+ # By default Devise will store the user in session. You can skip storage for
96
+ # particular strategies by setting this option.
97
+ # Notice that if you are skipping storage for all authentication paths, you
98
+ # may want to disable generating routes to Devise's sessions controller by
99
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
100
+ config.skip_session_storage = [:http_auth]
101
+
102
+ # By default, Devise cleans up the CSRF token on authentication to
103
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
104
+ # requests for sign in and sign up, you need to get a new CSRF token
105
+ # from the server. You can disable this option at your own risk.
106
+ # config.clean_up_csrf_token_on_authentication = true
107
+
108
+ # When false, Devise will not attempt to reload routes on eager load.
109
+ # This can reduce the time taken to boot the app but if your application
110
+ # requires the Devise mappings to be loaded during boot time the application
111
+ # won't boot properly.
112
+ # config.reload_routes = true
113
+
114
+ # ==> Configuration for :database_authenticatable
115
+ # For bcrypt, this is the cost for hashing the password and defaults to 12. If
116
+ # using other algorithms, it sets how many times you want the password to be hashed.
117
+ # The number of stretches used for generating the hashed password are stored
118
+ # with the hashed password. This allows you to change the stretches without
119
+ # invalidating existing passwords.
120
+ #
121
+ # Limiting the stretches to just one in testing will increase the performance of
122
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
123
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
124
+ # algorithm), the cost increases exponentially with the number of stretches (e.g.
125
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
126
+ config.stretches = Rails.env.test? ? 1 : 12
127
+
128
+ # Set up a pepper to generate the hashed password.
129
+ # config.pepper = 'dc699df22fbd6095f54cacac13781ef5c4b58724207aea9077ab30cefe5f89877b645fe077fac434599cf97ea6c7e724b3623fb793acdf66ffc8ee854470ae88'
130
+
131
+ # Send a notification to the original email when the user's email is changed.
132
+ # config.send_email_changed_notification = false
133
+
134
+ # Send a notification email when the user's password is changed.
135
+ # config.send_password_change_notification = false
136
+
137
+ # ==> Configuration for :confirmable
138
+ # A period that the user is allowed to access the website even without
139
+ # confirming their account. For instance, if set to 2.days, the user will be
140
+ # able to access the website for two days without confirming their account,
141
+ # access will be blocked just in the third day.
142
+ # You can also set it to nil, which will allow the user to access the website
143
+ # without confirming their account.
144
+ # Default is 0.days, meaning the user cannot access the website without
145
+ # confirming their account.
146
+ # config.allow_unconfirmed_access_for = 2.days
147
+
148
+ # A period that the user is allowed to confirm their account before their
149
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
150
+ # their account within 3 days after the mail was sent, but on the fourth day
151
+ # their account can't be confirmed with the token any more.
152
+ # Default is nil, meaning there is no restriction on how long a user can take
153
+ # before confirming their account.
154
+ # config.confirm_within = 3.days
155
+
156
+ # If true, requires any email changes to be confirmed (exactly the same way as
157
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
158
+ # db field (see migrations). Until confirmed, new email is stored in
159
+ # unconfirmed_email column, and copied to email column on successful confirmation.
160
+ config.reconfirmable = true
161
+
162
+ # Defines which key will be used when confirming an account
163
+ # config.confirmation_keys = [:email]
164
+
165
+ # ==> Configuration for :rememberable
166
+ # The time the user will be remembered without asking for credentials again.
167
+ # config.remember_for = 2.weeks
168
+
169
+ # Invalidates all the remember me tokens when the user signs out.
170
+ config.expire_all_remember_me_on_sign_out = true
171
+
172
+ # If true, extends the user's remember period when remembered via cookie.
173
+ # config.extend_remember_period = false
174
+
175
+ # Options to be passed to the created cookie. For instance, you can set
176
+ # secure: true in order to force SSL only cookies.
177
+ # config.rememberable_options = {}
178
+
179
+ # ==> Configuration for :validatable
180
+ # Range for password length.
181
+ config.password_length = 6..128
182
+
183
+ # Email regex used to validate email formats. It simply asserts that
184
+ # one (and only one) @ exists in the given string. This is mainly
185
+ # to give user feedback and not to assert the e-mail validity.
186
+ config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
187
+
188
+ # ==> Configuration for :timeoutable
189
+ # The time you want to timeout the user session without activity. After this
190
+ # time the user will be asked for credentials again. Default is 30 minutes.
191
+ # config.timeout_in = 30.minutes
192
+
193
+ # ==> Configuration for :lockable
194
+ # Defines which strategy will be used to lock an account.
195
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
196
+ # :none = No lock strategy. You should handle locking by yourself.
197
+ # config.lock_strategy = :failed_attempts
198
+
199
+ # Defines which key will be used when locking and unlocking an account
200
+ # config.unlock_keys = [:email]
201
+
202
+ # Defines which strategy will be used to unlock an account.
203
+ # :email = Sends an unlock link to the user email
204
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
205
+ # :both = Enables both strategies
206
+ # :none = No unlock strategy. You should handle unlocking by yourself.
207
+ # config.unlock_strategy = :both
208
+
209
+ # Number of authentication tries before locking an account if lock_strategy
210
+ # is failed attempts.
211
+ # config.maximum_attempts = 20
212
+
213
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
214
+ # config.unlock_in = 1.hour
215
+
216
+ # Warn on the last attempt before the account is locked.
217
+ # config.last_attempt_warning = true
218
+
219
+ # ==> Configuration for :recoverable
220
+ #
221
+ # Defines which key will be used when recovering the password for an account
222
+ # config.reset_password_keys = [:email]
223
+
224
+ # Time interval you can reset your password with a reset password key.
225
+ # Don't put a too small interval or your users won't have the time to
226
+ # change their passwords.
227
+ config.reset_password_within = 6.hours
228
+
229
+ # When set to false, does not sign a user in automatically after their password is
230
+ # reset. Defaults to true, so a user is signed in automatically after a reset.
231
+ # config.sign_in_after_reset_password = true
232
+
233
+ # ==> Configuration for :encryptable
234
+ # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
235
+ # You can use :sha1, :sha512 or algorithms from others authentication tools as
236
+ # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
237
+ # for default behavior) and :restful_authentication_sha1 (then you should set
238
+ # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
239
+ #
240
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
241
+ # config.encryptor = :sha512
242
+
243
+ # ==> Scopes configuration
244
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
245
+ # "users/sessions/new". It's turned off by default because it's slower if you
246
+ # are using only default views.
247
+ # config.scoped_views = false
248
+
249
+ # Configure the default scope given to Warden. By default it's the first
250
+ # devise role declared in your routes (usually :user).
251
+ # config.default_scope = :user
252
+
253
+ # Set this configuration to false if you want /users/sign_out to sign out
254
+ # only the current scope. By default, Devise signs out all scopes.
255
+ # config.sign_out_all_scopes = true
256
+
257
+ # ==> Navigation configuration
258
+ # Lists the formats that should be treated as navigational. Formats like
259
+ # :html, should redirect to the sign in page when the user does not have
260
+ # access, but formats like :xml or :json, should return 401.
261
+ #
262
+ # If you have any extra navigational formats, like :iphone or :mobile, you
263
+ # should add them to the navigational formats lists.
264
+ #
265
+ # The "*/*" below is required to match Internet Explorer requests.
266
+ # config.navigational_formats = ['*/*', :html]
267
+
268
+ # The default HTTP method used to sign out a resource. Default is :delete.
269
+ config.sign_out_via = :delete
270
+
271
+ # ==> OmniAuth
272
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
273
+ # up on your models and hooks.
274
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
275
+
276
+ # ==> Warden configuration
277
+ # If you want to use other strategies, that are not supported by Devise, or
278
+ # change the failure app, you can configure them inside the config.warden block.
279
+ #
280
+ # config.warden do |manager|
281
+ # manager.intercept_401 = false
282
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
283
+ # end
284
+
285
+ # ==> Mountable engine configurations
286
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
287
+ # is mountable, there are some extra configurations to be taken into account.
288
+ # The following options are available, assuming the engine is mounted as:
289
+ #
290
+ # mount MyEngine, at: '/my_engine'
291
+ #
292
+ # The router that invoked `devise_for`, in the example above, would be:
293
+ # config.router_name = :my_engine
294
+ #
295
+ # When using OmniAuth, Devise cannot automatically set OmniAuth path,
296
+ # so you need to do it manually. For the users scope, it would be:
297
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
298
+
299
+ # ==> Turbolinks configuration
300
+ # If your app is using Turbolinks, Turbolinks::Controller needs to be included to make redirection work correctly:
301
+ #
302
+ # ActiveSupport.on_load(:devise_failure_app) do
303
+ # include Turbolinks::Controller
304
+ # end
305
+
306
+ # ==> Configuration for :registerable
307
+
308
+ # When set to false, does not sign a user in automatically after their password is
309
+ # changed. Defaults to true, so a user is signed in automatically after changing a password.
310
+ # config.sign_in_after_change_password = true
311
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # Configure parameters to be filtered from the log file. Use this to limit dissemination of
6
+ # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
7
+ # notations and behaviors.
8
+ Rails.application.config.filter_parameters += [
9
+ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
10
+ ]
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Add new inflection rules using the following format. Inflections
5
+ # are locale specific, and you may define rules for as many different
6
+ # locales as you wish. All of these examples are active by default:
7
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
8
+ # inflect.plural /^(ox)$/i, "\\1en"
9
+ # inflect.singular /^(ox)en/i, "\\1"
10
+ # inflect.irregular "person", "people"
11
+ # inflect.uncountable %w( fish sheep )
12
+ # end
13
+
14
+ # These inflection rules are supported but not enabled by default:
15
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
16
+ # inflect.acronym "RESTful"
17
+ # end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ # Define an application-wide HTTP permissions policy. For further
3
+ # information see https://developers.google.com/web/updates/2018/06/feature-policy
4
+ #
5
+ # Rails.application.config.permissions_policy do |f|
6
+ # f.camera :none
7
+ # f.gyroscope :none
8
+ # f.microphone :none
9
+ # f.usb :none
10
+ # f.fullscreen :self
11
+ # f.payment :self, "https://secure.example.com"
12
+ # end
@@ -0,0 +1,65 @@
1
+ # Additional translations at https://github.com/heartcombo/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid %{authentication_keys} or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid %{authentication_keys} or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your email address before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock instructions"
26
+ email_changed:
27
+ subject: "Email Changed"
28
+ password_change:
29
+ subject: "Password Changed"
30
+ omniauth_callbacks:
31
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
32
+ success: "Successfully authenticated from %{kind} account."
33
+ passwords:
34
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
35
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
36
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
37
+ updated: "Your password has been changed successfully. You are now signed in."
38
+ updated_not_active: "Your password has been changed successfully."
39
+ registrations:
40
+ destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
41
+ signed_up: "Welcome! You have signed up successfully."
42
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
43
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
44
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
45
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirmation link to confirm your new email address."
46
+ updated: "Your account has been updated successfully."
47
+ updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again."
48
+ sessions:
49
+ signed_in: "Signed in successfully."
50
+ signed_out: "Signed out successfully."
51
+ already_signed_out: "Signed out successfully."
52
+ unlocks:
53
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
54
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
55
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
56
+ errors:
57
+ messages:
58
+ already_confirmed: "was already confirmed, please try signing in"
59
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
60
+ expired: "has expired, please request a new one"
61
+ not_found: "not found"
62
+ not_locked: "was not locked"
63
+ not_saved:
64
+ one: "1 error prohibited this %{resource} from being saved:"
65
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -0,0 +1,33 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t "hello"
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t("hello") %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # "true": "foo"
28
+ #
29
+ # To learn more, please read the Rails Internationalization guide
30
+ # available at https://guides.rubyonrails.org/i18n.html.
31
+
32
+ en:
33
+ hello: "Hello world"
data/config/puma.rb ADDED
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Puma can serve each request in a thread from an internal thread pool.
4
+ # The `threads` method setting takes two numbers: a minimum and maximum.
5
+ # Any libraries that use thread pools should be configured to match
6
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
7
+ # and maximum; this matches the default thread size of Active Record.
8
+ #
9
+ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
10
+ min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
11
+ threads min_threads_count, max_threads_count
12
+
13
+ # Specifies the `worker_timeout` threshold that Puma will use to wait before
14
+ # terminating a worker in development environments.
15
+ #
16
+ worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
17
+
18
+ # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
19
+ #
20
+ port ENV.fetch("PORT") { 3000 }
21
+
22
+ # Specifies the `environment` that Puma will run in.
23
+ #
24
+ environment ENV.fetch("RAILS_ENV") { "development" }
25
+
26
+ # Specifies the `pidfile` that Puma will use.
27
+ pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
28
+
29
+ # Specifies the number of `workers` to boot in clustered mode.
30
+ # Workers are forked web server processes. If using threads and workers together
31
+ # the concurrency of the application would be max `threads` * `workers`.
32
+ # Workers do not work on JRuby or Windows (both of which do not support
33
+ # processes).
34
+ #
35
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
36
+
37
+ # Use the `preload_app!` method when specifying a `workers` number.
38
+ # This directive tells Puma to first boot the application and load code
39
+ # before forking the application. This takes advantage of Copy On Write
40
+ # process behavior so workers use less memory.
41
+ #
42
+ # preload_app!
43
+
44
+ # Allow puma to be restarted by `bin/rails restart` command.
45
+ plugin :tmp_restart
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :api do
4
+ namespace :v1 do
5
+ post "confirm_block", to: "block_confirmations#confirm_block"
6
+ get "tr_to_mine", to: "block_confirmations#transactions_to_mine"
7
+ get "info_to_mine", to: "block_confirmations#info_to_mine"
8
+ end
9
+ end
data/config/routes.rb ADDED
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sidekiq/web"
4
+
5
+ Rails.application.routes.draw do
6
+ mount Sidekiq::Web => "/sidekiq" if Rails.env.development?
7
+ resources :signatures
8
+ resources :tickets
9
+ resources :pools
10
+ resources :contracts
11
+ resources :transactions
12
+ resources :wallets
13
+ resources :blocks, only: %i[index show]
14
+ resources :chains
15
+ devise_for :users, controllers: { registrations: "users/registrations", sessions: "users/sessions" }
16
+
17
+ devise_scope :user do
18
+ get "sign_in", to: "users/sessions#new"
19
+ get "sign_out", to: "users/sessions#destroy"
20
+ get "sign_up", to: "users/registrations#new"
21
+ end
22
+
23
+ root to: "application#home"
24
+ get "mining_profile", to: "application#mining_profile"
25
+ get "terms", to: "application#terms"
26
+ get "privacy_policy", to: "application#privacy_policy"
27
+
28
+ # load the api routes from api_routes.rb
29
+ draw :api
30
+ end
@@ -0,0 +1,10 @@
1
+ development:
2
+ :concurrency: 5
3
+
4
+ production:
5
+ :concurrency: 5
6
+
7
+ :max_retries: 1
8
+
9
+ :queues:
10
+ - default
@@ -0,0 +1,34 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
8
+
9
+ # Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10
+ # amazon:
11
+ # service: S3
12
+ # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13
+ # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14
+ # region: us-east-1
15
+ # bucket: your_own_bucket-<%= Rails.env %>
16
+
17
+ # Remember not to checkin your GCS keyfile to a repository
18
+ # google:
19
+ # service: GCS
20
+ # project: your_project
21
+ # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22
+ # bucket: your_own_bucket-<%= Rails.env %>
23
+
24
+ # Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25
+ # microsoft:
26
+ # service: AzureStorage
27
+ # storage_account_name: your_account_name
28
+ # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29
+ # container: your_container_name-<%= Rails.env %>
30
+
31
+ # mirror:
32
+ # service: Mirror
33
+ # primary: local
34
+ # mirrors: [ amazon, google, microsoft ]
@@ -0,0 +1,23 @@
1
+ const defaultTheme = require('tailwindcss/defaultTheme')
2
+
3
+ module.exports = {
4
+ separator: "_",
5
+ content: [
6
+ './public/*.html',
7
+ './app/helpers/**/*.rb',
8
+ './app/javascript/**/*.js',
9
+ './app/views/**/*.{erb,haml,html,slim}'
10
+ ],
11
+ theme: {
12
+ extend: {
13
+ fontFamily: {
14
+ sans: ['Inter var', ...defaultTheme.fontFamily.sans],
15
+ },
16
+ },
17
+ },
18
+ plugins: [
19
+ require('@tailwindcss/forms'),
20
+ require('@tailwindcss/aspect-ratio'),
21
+ require('@tailwindcss/typography'),
22
+ ]
23
+ }
data/config.ru ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is used by Rack-based servers to start the application.
4
+
5
+ require_relative "config/environment"
6
+
7
+ run Rails.application
8
+ Rails.application.load_server
@@ -0,0 +1,5 @@
1
+ {
2
+ "result": {
3
+ "line": 70.1
4
+ }
5
+ }