Skip to content

Commit

Permalink
Update nara from master (#300)
Browse files Browse the repository at this point in the history
* Adds mappings for `ChannelAssetsDeletedByModerator` & `VideoAssetsDeletedByModerator` events (#199)

* mark 'VideoDeletedByModerator' & 'ChannelDeletedByModerator' events deprecated

* Implements mappings for 'Content.VideoAssetsDeletedByModerator and 'Content.ChannelAssetsDeletedByModerator' runtime events

* remove unused import

* Nara/crt update (#244)

* feat: build orion

* feat: start generating schema

* fix: extra entities

* fixup!

* fix: continue implementing design specs

* fix: review and fix foreign key relationships

* fix: formatting

* fix: generation errors

* fix: add comment

* fix: relations

* fix: final review

* fixup!

* fix: add ending blocks

* fix: generate type & set typegen to ipv4

* fix: add support for event backward compatibility

* feat: start adding mappings

* fix: continue with mappnigs

* feat: init sale

* feat: patronage decreased to & fixed build

* feat: claim patronage event

* feat: tokens bought on amm

* feat: tokens sold on amm

* fix: add relation between sales and vesting schedules

* feat: add Tokens sold on sale vente

* feat: update upcoming sale

* feat: revenue share issued

* feat: member joined whitelist

* feat: amm deactivated

* feat: burned token

* feat: transfer policy changed to permissionless

* feat: sale finalized

* feat: finish mappings

* fix: review

* fix: remove cascade deletions

* fix: renaming & formatting

* fixup!

* fixup!

* fix: patched protobuf packages with token proto

* feat: update metadata and add event handler scheleton

* feat: token metadata

* feat: sale metadata

* fix: review comments

* fix: formatting

* fix: revenue

* Revert "fix: revenue"

This reverts commit 0821abe.

* fix: token status after sale

* fix: fixmes

* fix: formatting

* fix: funds accounting during sale

* fix: amount accounting

* fix: linter

* fix: review

* fix: review 2

* fix: review

* fix: linter

* feat: migration for new db scheam

* fix: update event versions

* fix: patch types with crt_release types

* fix: patch types

* fix: generate all events versions since mainnet

* fix: temp fix after event version generation

* fix: event versioning

* fix: add migration

* fix: mignations

* fix: solve channel not being added

* fix: add id to TokenChannel

* fix: non-nullable deleted field set

* fix: format

* feat: creator token init sale re enabling

* feat: re enable sale init code

* fix: update types

* fix: amm id

* fix: id computation for revenue share

* fix: amm id computation for token

* fix: issuer transfer accounting

* fix: amm tx id

* fix: destination accounting

* feat: minor fix on holder transfer processing

* fix: re-enable metadata

* fix: metadata parsing

* fix: post reword cleanup

* fix: format

* fix: silence ci checks

* fix: event version

* fix: address PR changes

I edited all the entity that have a composite index like TokenAccount so that they have
a synthetic ID and an optionally unique @index

* fix: add hidden entities conditions

* fix: add extra fields to token in order to keep track of ongoing status

* fix: build errors

* fix: adapt mapping to new token fields

* fix: format

* feat: add trailer video entity

this is required so we can simply make trailer video hidden if video is hidden

* fix: linter

* chore: prettier

* fix: from PR review

* fix: vesting schedule schema & mappings

I have replaced the vesting schedule back to the original schema with:
- VestingSchedule: holding vesting schedule information such being amount agnostic
- VestedAccount: contains information regarded to a vested account, the goal is to mimic the
runtime logic

* fix: burning from vesting

* patch: metadata-protobuf package

* patch: metadata-protobuf package

* fix: generate migrations

* fix: purchase token on sale

* Update schema/token.graphql

Co-authored-by: Leszek Wiesner <leszek@jsgenesis.com>

* Update schema/token.graphql

Co-authored-by: Leszek Wiesner <leszek@jsgenesis.com>

* fix: address PR

* fix: hidden entities

* fix: migration ok

* feat: add extra check for migrations

* fix: docker network

* fix: format

* fix: remove unrequired constraint

* fix: 🐛 post rebase fixes

* feat: 🎨 add metadata processing for issue token

* feat(crt-v1): ✨ chain metadata for v 2003

* fix(crt-v1): 🚑 comment out view element for orion playgroud

* fix(crt-v1): 🎨 add playground config variable to .env

* feat: ✅ add tests

* fix(crt-v1): 📦 packages and patches

* fix(crt-v1): ✅ update entity id used and other minor fixes

* fix(crt-v1): ✅ update entity id used and other minor fixes

* test(crt-v1): 🐛 misc fixes to have tests working

* test(crt-v1): 🐛 misc fixes to have tests working

* fix(crt-v1): 🐛 metadata and trailer video

* feat(crt-v1): 🎨 update types

* fix(crt-v1): ✨ Add correct Ratio denomination (Permill)

* update with master

* fix: 🐛 metadata not being set

* fix: 🐛 parameters order

* test: 🧪 fixing integration tests

* test(crt-v1): 🧪 fix integration tests

* feat(crt-v1): ✨ last price for token and recovered field for rev share part

* feat: ✨ add resolver for dividend amount

* feat(crt-v1): ✨ start adding channel fields for trackingtotal revenue

* feat(crt-v1): ✨ add utils for royalty computation

* feat(crt-v1): ✨ cumulative revenue on channel

* feat(crt-v1): ✨ add resolver for transferrable amount

* fix(crt-v1): ✨ add `acquiredAt` to pinpoint latest vesting schedule for account

* Token metadata processing update

* Prettier

* chore(crt-v1): ⚡ dbgen

* fix(crt-v1): 🧪 fix integration tests

* fix(crt-v1): 🐛 missing fields in token sale vesting source

* test(crt-v1): 🧪 test for transferrable balance amount

* fix(crt-v1): 🐛 transferrable amount

* test: 🧪 update tests after resolver fix

* fix: 🐛 error on vesting schedules array

* fix: 🎨 CI fixes

* docs: update gitignore

* fix: 🚨 prettier

* build: 📌 chai depnedencies

---------

Co-authored-by: Leszek Wiesner <leszek@jsgenesis.com>
Co-authored-by: WRadoslaw <r.wyszynski00@gmail.com>

* Clear benefits even if not passed (#282)

* 🤑 Fix revenue share dividend estimation (#297)

* Fix on revenue share dividend estimation

* Fix type on result

* 🛕 Historical revenue share participants (#286)

* New field for revenue share

* Set potential revenue share particitants at the time of start

* fix: .gitignore not working

* fix lint issues

* re-generate db migrations

* commit register.html.mst file

* fix: notifications integration test

---------

Co-authored-by: Ignazio Bovo <ignazio@jsgenesis.com>
Co-authored-by: Leszek Wiesner <leszek@jsgenesis.com>
Co-authored-by: WRadoslaw <r.wyszynski00@gmail.com>
Co-authored-by: WRadoslaw <92513933+WRadoslaw@users.noreply.github.com>
  • Loading branch information
5 people authored Feb 27, 2024
1 parent 743f56b commit 887427c
Show file tree
Hide file tree
Showing 193 changed files with 107,050 additions and 31,012 deletions.
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ DB_PASS=squid
DB_ADMIN_USER=admin
DB_ADMIN_PASS=admin
DB_PORT=23798

# Processor service host
PROCESSOR_HOST=localhost
# Processor service prometheus port
PROCESSOR_PROMETHEUS_PORT=3337
# Graphql server port
Expand Down Expand Up @@ -63,6 +64,8 @@ SENDGRID_FROM_EMAIL=gateway@example.com

# Debug settings
SQD_DEBUG=api:*

# playground
OPENAPI_PLAYGROUND=true

# max number of attempts to deliver email notification
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,26 @@ jobs:
node-version: ${{matrix.node-version}}
- name: Build docker image
run: make build-docker

migrations:
name: Run migrations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Prepare workspace
run: make prepare
- name: create joystream_default network
run: docker network create joystream_default
- name: Start db
run: docker-compose up -d orion_db
- name: Wait for db
run: |
while ! docker-compose exec -T orion_db pg_isready -U postgres -p 23798; do
sleep 1
done
- name: Run migrations
run: make migrate
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ src/auth-server/emails/templates/preview
/scripts/orion-v1-migration/data
/db/export
/db/migrations_dir*
.DS_STORE

# network tests
network-tests/graphql/generated
network-tests/node_modules
network-tests/lib

# LOGS
chron_mail_scheduler.log
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

16 changes: 0 additions & 16 deletions .vscode/tasks.json

This file was deleted.

Binary file added .yarn/install-state.gz
Binary file not shown.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ process: migrate

install:
@rm -rf node_modules # clean up node_modules to avoid issues with patch-package
@rm -rf network-tests/node_modules # clean up node_modules to avoid issues with patch-package
@npm install

build:
Expand Down Expand Up @@ -48,6 +49,8 @@ codegen:
@npm run generate:schema || true
@npx squid-typeorm-codegen

network-tests:
@npm run generate:network-tests || true

typegen:
@npx squid-substrate-typegen typegen.json
Expand Down
145 changes: 145 additions & 0 deletions db/migrations/1709038872405-Data.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

const { getViewDefinitions } = require('../viewDefinitions')

module.exports = class Views1708791754135 {
name = 'Views1708791754135'
module.exports = class Views1709038872576 {
name = 'Views1709038872576'

async up(db) {
const viewDefinitions = getViewDefinitions(db);
Expand Down
3 changes: 2 additions & 1 deletion docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

# Docker db config
DB_HOST=orion_db
# DB connection
# Processor service host
PROCESSOR_HOST=orion_processor
# Archive gateway host&port (can be overriden via local env)
ARCHIVE_GATEWAY_URL=${CUSTOM_ARCHIVE_GATEWAY_URL:-http://orion_archive_gateway:8000/graphql}
ARCHIVE_GATEWAY_URL=${CUSTOM_ARCHIVE_GATEWAY_URL:-http://orion_archive_gateway:8000/graphql}
246 changes: 246 additions & 0 deletions docs/developer-guide.md

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions joystream.jsonl

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions network-tests/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TREASURY_ACCOUNT_URI="//Bob"
TREASURY_INITIAL_BALANCE="100000000000000"
MINI_SECRET=""
Empty file added network-tests/.prettierignore
Empty file.
Loading

0 comments on commit 887427c

Please sign in to comment.