smart_contract_hub

所属分类:以太坊
开发工具:Ruby
文件大小:0KB
下载次数:0
上传日期:2023-09-21 08:43:18
上 传 者sh-1993
说明:  智能合约中心,,
(smart contract hub,,)

文件列表:
.haml-lint.yml (227, 2023-12-04)
.haml-lint_todo.yml (460, 2023-12-04)
.prettierignore (35, 2023-12-04)
.rubocop.yml (1266, 2023-12-04)
.rubocop_todo.yml (644, 2023-12-04)
.ruby-version (10, 2023-12-04)
.scss-lint.yml (152, 2023-12-04)
Gemfile (2020, 2023-12-04)
Gemfile.lock (9403, 2023-12-04)
Procfile (54, 2023-12-04)
Procfile.dev (81, 2023-12-04)
Rakefile (258, 2023-12-04)
app/ (0, 2023-12-04)
app/assets/ (0, 2023-12-04)
app/assets/config/ (0, 2023-12-04)
app/assets/config/manifest.js (47, 2023-12-04)
app/assets/images/ (0, 2023-12-04)
app/assets/images/.keep (0, 2023-12-04)
app/assets/images/az-efp-light.svg (17419, 2023-12-04)
app/assets/images/favicon-montserrat.svg (3034, 2023-12-04)
app/assets/images/favicon.png (2085, 2023-12-04)
app/assets/stylesheets/ (0, 2023-12-04)
app/assets/stylesheets/application.scss (965, 2023-12-04)
app/assets/stylesheets/application/ (0, 2023-12-04)
app/assets/stylesheets/application/footer.scss (345, 2023-12-04)
app/assets/stylesheets/application/polkadot_account_list.scss (512, 2023-12-04)
app/assets/stylesheets/smart_contracts/ (0, 2023-12-04)
app/assets/stylesheets/smart_contracts/index.scss (1082, 2023-12-04)
app/assets/stylesheets/smart_contracts/new.scss (207, 2023-12-04)
app/channels/ (0, 2023-12-04)
app/channels/application_cable/ (0, 2023-12-04)
app/channels/application_cable/channel.rb (110, 2023-12-04)
app/channels/application_cable/connection.rb (116, 2023-12-04)
app/controllers/ (0, 2023-12-04)
app/controllers/active_storage/ (0, 2023-12-04)
app/controllers/active_storage/direct_uploads_controller.rb (1373, 2023-12-04)
app/controllers/application_controller.rb (88, 2023-12-04)
app/controllers/concerns/ (0, 2023-12-04)
... ...

# Smart Contract Hub ## Setup Set master.key as required ### Development ``` bin/dev ``` ## Checking code ``` rspec rubocop -A haml-lint app/views/ yarn prettier --write app/javascript/ scss-lint ``` ## Velzon template ## Storage decisions - Files are being stored and served from Storj. - A backup is being stored on Solar Communications, this may have to be manually done as mirroring with direct uploads may not work. - Active Storage is being used to assist with direct uploads and validations, but the url is generated in the frontend which points to a public Storj bucket link. For this to work, the ActiveStorage::DirectUploadsController is monkey patched to store the key with the file extension. These decisions were made as links made by ActiveStorage have expiry dates. - The smart contract new form is used to create the record on the Smart Contact Hub smart contract. This means that all blobs will be orphans. Double check before deleting them as deletion from the bucket will be a disaster. ## References 1. https://docs.storj.io/dcs/code/rails-activestorage 2. https://edgeguides.rubyonrails.org/active_storage_overview.html 3. https://docs.azero.id/ 4. https://github.com/rails/rails/blob/main/activestorage/app/models/active_storage/blob.rb#L113 5. https://web-crunch.com/posts/rails-drag-drop-active-storage-stimulus-dropzone 6. https://docs.dropzone.dev/configuration/events

近期下载者

相关文件


收藏者