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

Implement procedural macro for getting the required balance for a transaction #345

Open
rrtti opened this issue Sep 16, 2020 · 4 comments
Open
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework.

Comments

@rrtti
Copy link

rrtti commented Sep 16, 2020

Setup is stash account (proxy) <-- multisig wallet <-- user account

  1. I sign with my account to call approve on this multisig, that has a stash account with funds as proxy.
  2. all accounts have a few dots each that are transferrable, which I initially thought was sufficient for the call.

When trying to confirm the tx, the call returns "Insufficient balance" - more transparency might be needed around what kind of balance they need to interact with an extrinsics.

@bkchr bkchr transferred this issue from paritytech/polkadot Oct 6, 2020
@bkchr bkchr removed their assignment Oct 6, 2020
@bkchr
Copy link
Member

bkchr commented Oct 6, 2020

After paritytech/substrate#5678 is finished, we should add support for a new attribute macro.
This attribute macro should be similar to the weight and should expose information about deposits, locks etc to the outside. This could be combined with the transaction payment pr to find out how much balance a user requires for a certain transaction, instead of doing trial and error as described above.

So we will require the following:

  • Some type that expresses how much and for what a transaction requires tokens (reserve, spent, etc)
  • Add a new attribute macro (name tbd)
  • If the attribute macro is not given, we would only fallback to show the amount of tokens being payed for the transaction itself.
  • Provide a RPC that probably replaces the transaction payment RPC to make these information accessible.

@bkchr bkchr changed the title 'Insufficient balance' msg when trying to initiate a call for multisig Implement procedural macro for getting the required balance for a transaction Oct 6, 2020
@kianenigma
Copy link
Contributor

Provide a RPC that probably replaces the transaction payment RPC to make these information accessible.

Can't the content of this new attribute macro be a new filed in the metadata?


@rrtti with just your description and and the title I can barely understand the issue, can you elaborate bit more? and is it similar to this? paritytech/substrate#7240

@bkchr
Copy link
Member

bkchr commented Oct 12, 2020

@kianenigma For that reason I have added a comment that explains on what should be done :P

@bkchr
Copy link
Member

bkchr commented Oct 12, 2020

Regarding paritytech/substrate#7240, this is something different AFAIK. This new macro should be able to express stuff like deposits. So, you can query how much actual tokens you need (deposit + fees). Currently we can only query the fees and we need to know that a certain function requires a fixed amount for deposits.

@juangirini juangirini transferred this issue from paritytech/substrate Aug 24, 2023
@the-right-joyce the-right-joyce added I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework. and removed C3-medium labels Aug 25, 2023
claravanstaden pushed a commit to Snowfork/polkadot-sdk that referenced this issue Dec 8, 2023
helin6 pushed a commit to boolnetwork/polkadot-sdk that referenced this issue Feb 5, 2024
* Use override in eth_getLogs

* Use override in EthFilterApi

* Wrap overrides in an Arc

* Fix checker

* Use override in EthPubSubApi

* Fix checker

* Add OverrideHandle

* Fix checker

* Update test-web3api

* Bump fc-rpc version 2.0.0-dev

* CHANGELOG unreleased notes

* Update Cargo.lock
jonathanudd pushed a commit to jonathanudd/polkadot-sdk that referenced this issue Apr 10, 2024
* make message-lane Event generic

* cargo fmt --all

* Update modules/message-lane/src/lib.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
Status: Backlog
Development

No branches or pull requests

5 participants