Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction builder draft #1258

Draft
wants to merge 6 commits into
base: dev
Choose a base branch
from
Draft

Transaction builder draft #1258

wants to merge 6 commits into from

Conversation

valentunn
Copy link
Member

No description provided.

Copy link
Contributor

github-actions bot commented Nov 28, 2023

Current coverage report

Summary

Lines Statements Branches Functions
Covered: 34%
37.21% (131/352) 30.85% (29/94) 15.21% (14/92)

Tests which was executed

Tests Skipped Failures Errors Time
306 4 💤 0 ❌ 0 🔥 1m 14s ⏱️
Coverage by files (34%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files37.2130.8515.2134.78 
entities/transactionBuilder/lib0000 
   compound-wallet.ts000031–79
   factory.ts000023–75
   leaf.ts000026–92
   multisig.ts000036–134
entities/transactionBuilder/lib/helpers0000 
   amount-reduction.ts000019–45
   helpers.ts000014–87
entities/wallet/lib31.0314.283034.78 
   wallet-utils.ts31.0314.283034.7827–31, 42, 54–72, 81
pages/Staking/Operations/Restake82.9551.5153.3384.81 
   Restake.tsx82.9551.5153.3384.8166–67, 80–83, 88–89, 135–142, 153, 207
shared/core/types86.6610066.6650 
   wallet.ts86.6610066.665072–73
shared/lib/utils59.01508.3352.94 
   substrate.ts59.01508.3352.9422–57, 67–104, 118, 122–124, 152, 156–159, 163–169, 177

@valentunn valentunn marked this pull request as draft November 28, 2023 11:26
Copy link
Contributor

@tuul-wq tuul-wq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First part of questions

@stepanLav stepanLav added CI: internal-build PRs for stage build and removed CI: internal-build PRs for stage build labels Dec 7, 2023

transactionBuilder.visitAll({
visitMultisig(visit: MultisigVisit) {
// TODO check who pays deposit in case multisig is wrapped in some other structure, like proxy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that helps, the submitter always pays the deposit for the multisig transaction state. Now depending on the action performed, there may be other deposit required. for instance:

  • A multisig is creating a proxy. The submitter needs ~20 DOTs for the multisig tx, but the Multisig that will then create the proxy will also need 20 DOTs for the proxy creation deposit
  • A Multisig with pure proxy sets an identity. The submitter needs ~20 DOTs for the multisig tx, but the Multisig that will then set an will also need 20 DOTs for the identity deposit

TL;DR, the depositor/submitter needs the multisig tx deposit, but the transaction may fail when being submitted by the last signatory, because of some other deposit.

@pgolovkin
Copy link
Collaborator

@valentunn don't you mind if I close this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants