Skip to content

Feature Request: Estimate fee method for platform transactions #2807

@pshenmic

Description

@pshenmic

Issue

There are no fee estimation RPC methods for Platform transactions available in the DAPI, and it is very difficult to calculate the fee yourself because it depends on many factors and same transaction may cost different amount of credits. There are certain cases when you need to know a specific amount of gas (credits) the transaction will take to proceed, for example when you want to withdraw the whole balance with IdentityCreditWithdrawal transaction.

There is an estimation fee method for Dash Core transactions in DAPI, and I think we need something similar for Dash Platform, because sometimes you have to show it before you sign your tx, for example in wallets.

Possible Solution

Add an RPC method in the DAPI for estimating transaction fee that takes unsigned platform transaction as an parameter

Or implement fee size calculation method in rs-dpp

Additional Context

This is very useful and even necessary for third-party integrations, especially in backend systems in exchanges and wallets, where it is necessary to show an exact fee that user will be charged with before broadcasting transaction in the network

Metadata

Metadata

Assignees

No one assigned

    Labels

    InterestingSomething we should do.enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions