1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-13 03:32:22 +00:00
ton/storage/storage-daemon/smartcont
2023-05-24 10:29:34 +03:00
..
.gitignore TON Storage utilities (#564) 2022-12-22 12:24:13 +03:00
build.sh TON Storage utilities (#564) 2022-12-22 12:24:13 +03:00
constants.fc Update op-code for provider/contract interaction (#602) 2023-02-02 12:28:41 +03:00
embed-provider-code.cpp TON Storage utilities (#564) 2022-12-22 12:24:13 +03:00
README.md TON Storage utilities (#564) 2022-12-22 12:24:13 +03:00
storage-contract-code.boc Update op-code for provider/contract interaction (#602) 2023-02-02 12:28:41 +03:00
storage-contract.fc Update op-code for provider/contract interaction (#602) 2023-02-02 12:28:41 +03:00
storage-contract.fif Update op-code for provider/contract interaction (#602) 2023-02-02 12:28:41 +03:00
storage-provider-code.boc Update storage-provider compilled smartcontracts 2023-05-24 10:29:34 +03:00
storage-provider.fc Adjust storage-provider.fc fees 2023-05-19 16:09:10 +03:00
storage-provider.fif Update storage-provider compilled smartcontracts 2023-05-24 10:29:34 +03:00

Storage Provider

Simple smart-contract system for conclusion of a storage agreements.

  • guarantees that the provider stores the file
  • no storage - no payment
  • no penalties, if provider doesn't store file client can stop payment at any time
  • no control that provider upload the file: client can stop payment at any time if not satisfied

Storage Agreements Fabric

Storage provider deploy storage agreements fabric. Any client may request fabric to deploy storage agreement contract. Fabric provides get-method get_storage_params which returns

  • accept_new_contracts? - whether provider accepts new contracts
  • rate_per_mb_day - price in nanoTON per Megabyte per day
  • max_span - maximal timespan between proving file storage which will be paid
  • minimal_file_size - minimal file size accepted by provider
  • maximal_file_size - maximal file size accepted by provider

Storage agreement

Agreement contract has client account and accept deposits to this account.

It also knows merkle root and allows provider to withdraw money from client account by providing merkle proof of file storage.

Client can stop agreement at any time.