Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

Luxor/vested wg spending #5072

Closed ignazio-bovo closed 5 months ago

ignazio-bovo commented 7 months ago

Addresses: #4948 based on top of #5062

Note: I have used the extrinsic vested_transfer inside the extrinsic spend_from_budget all extrinsic in substrate are now transactional by default, this means that if the vested_transfer fails then spend_from_budget is equivalent to a no-op. Also I have created one internal account for each WG where tokens are minted before they are transferred with vesting.

ignazio-bovo commented 7 months ago

To be rebased onto #5062

mnaamani commented 6 months ago

I think there is a simpler way to do this, without needing to have an account on each working group. Instead of pay_from_budget into the working group account then doing vesting::vested_transfer you should be able to pay from the budget directly into the target account, then do vesting::force_vested_transfer with source and target being the final destination. The balances::transfer inside force_vested_transfer will be a successful no-op, and then the vesting schedule will be applied.

mnaamani commented 6 months ago

Also I have created one internal account for each WG where tokens are minted before they are transferred with vesting.

https://github.com/Joystream/joystream/pull/5072#issuecomment-2002164477

ignazio-bovo commented 5 months ago

I need to add benchmarks

mnaamani commented 5 months ago

I think this now needs to be rebased on luxor since I merged the reduce council budget PR

mnaamani commented 5 months ago

strange that I'm seeing errors like ../../query-node/start.sh: line 11: docker-compose: command not found in CI workflow runs.. Has it been deprecated and we should replace all occurrences of that command with docker compose command?

I think you forgot to commit changes to: types/src/augment/augment-api-rpc.ts and types/src/augment/augment-types.ts