12 Commits

Author SHA1 Message Date
coopops 8897a93e83 [C28-29][@ant] feat(contracts): новый контракт expense — 8 actions, шасси расходов
Typecheck / desktop (pull_request) Successful in 13m4s
Typecheck / controller (pull_request) Successful in 12m44s
components/contracts/cpp/expense/:
- expense.hpp: 1 таблица proposals (scope=coopname; secondary by_hash/by_username/by_status),
  типы item, callback_handler, enum Mechanics/RecipientType/ProposalStatus/ItemStatus.
- expense.cpp: 8 actions (createexp/authexp/declexp/payexp/reportexp/closeexp/returnexp/overspendexp).
- CMakeLists.txt: стандартный add_contract(expense expense expense.cpp).

components/contracts/cpp/lib/consts.hpp:
- _expense = expense_n + добавлен в contracts_whitelist.

components/contracts/CMakeLists.txt:
- add_contract_build(expense).

Принцип v3:
- Один процесс p.exp.expns, 5 ledger2 operation_codes (o.exp.{blgadv,blgdir,advrpt,advret,over}).
- createexp принимает operation_code+source_wallet+callback в payload — контракт агностичен к источнику.
- payexp на DIRECT-механике сразу помечает item REPORTED (BURN blago = один полный шаг).
- payexp на ADVANCE — отдельный reportexp пайщиком после чека.
- closeexp шлёт inline action на сохранённый callback (contract,action,data) если он непустой.
- overspendexp — две последовательные Ledger2::apply (OVERSPEND + ADVANCE_REPORT) в одной транзакции.
2026-06-02 18:17:12 +00:00
coopops 2f1b8a5897 Merge branch 'dev' into reports
# Conflicts:
#	.gitignore
#	components/contracts/cpp/lib/consts.hpp
#	components/contracts/cpp/wallet/p.wal.depo.standard.yaml
#	components/contracts/standards-site/src/components/FocusBar.vue
#	components/cooptypes/src/common/names/index.ts
2026-05-04 11:23:58 +00:00
coopops 5865f6fc14 feat(contracts/apps): smart-contract каталога приложений + docker pipeline
Контракт `apps` (координационная плоскость для apps-catalog):
- 4 таблицы: packages, releases, subs, coops; ABI 21 KB, WASM 70 KB
- 11 actions: regpackage, transferpkg, setrelease, reactivate, withdraw,
  cleanup, regsub, expsub, regcoop, setcoop, migrate
- subs.chain_id и coops.chain_id — каноническая идентификация подсети
- coops.signing_key — отдельный subnet-signing-key (не active),
  ротация через setcoop без потери ранее выпущенных JWT
- releases с TTL retention 90 дней + inline cleanup до 50 записей
- atomic supersede в setrelease — выполняет FR8 «approve → ACTIVE»
  на стороне blockchain'а

CI контейнер `dicoop/contracts`:
- упаковывает все 21 контракт (15 user + 6 system eosio.*) в alpine 10.8 MB
- список контрактов берётся из CMakeLists (single source of truth)
- триггер push на dev/testnet/main + workflow_dispatch
- маппинг ветка→tag: dev/testnet/main + sha-pinned tag для воспроизводимости
- manifest.json с sha256 каждого артефакта внутри образа
- entrypoint: copy [name] | manifest | sha256 | list | ls
- multi-stage потребление в ke-bootstrap = 0 MB на VPS

Закрывает блокер Story 6.x (KE bootstrap) для apps-catalog.
2026-04-30 07:55:06 +00:00
Alex Ant 448b6000a3 [989-1][@ant] feat: внедрить ledger2 с apply и переключить контракты-инициаторы с legacy ledger — нужна двойная запись и единый API именованных операций для миграции остатков и регуляторной отчётности
Made-with: Cursor
2026-04-23 13:30:32 +00:00
Alex Ant a585e78fd9 ledger2 start 2026-04-17 01:55:08 +05:00
Alex Ant 2557c35bea add dev mode to smart-contracts, make notifications external accessable, make boot works 2025-11-07 20:20:17 +05:00
Alex Ant 741fc7eb05 готово к отладке 2025-08-08 16:51:46 +05:00
Alex Ant 15863d8a5a appendix еще не работает 2025-07-27 10:02:35 +05:00
Alex Ant 7de93e1780 add meet contract, cooptypes and empty documents templates 2025-04-16 19:58:49 +05:00
Alex Ant dcce7ffacc loan contract 2025-04-03 18:52:53 +05:00
Alex Ant e9fb137146 contracts refactoring 2025-04-03 09:36:48 +05:00
Alex Ant 2b6b56ace9 move contracts inside and make common setup script 2025-03-11 22:57:08 +05:00