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

Getting fees for a transaction is confusing in web3.js #23491

Closed
jacobcreech opened this issue Mar 4, 2022 · 3 comments
Closed

Getting fees for a transaction is confusing in web3.js #23491

jacobcreech opened this issue Mar 4, 2022 · 3 comments

Comments

@jacobcreech
Copy link
Contributor

Problem

With the current way a Transaction object is constructed, the new getFeeForMessage RPC call has confused some devs because it isn't obvious how to get the message from a constructed Transaction.

Proposed Solution

  1. Add getEstimatedFee(connection: Connection) function on Transaction object that returns the fees from getFeeForMessage
  2. Add Transaction constructor that takes in Message and Signatures[] like the rust implementation
  3. Add methods to build Message like you would a transaction, using addSIgnature and addInstruction to match the Rust implemtnation more.

Steps 2 and 3 are to help make it easier to understand what goes into building a transaction in web3.js, and step 1 is to make it simpler to get estimated fees for transactions.

@marcnjaramillo
Copy link
Contributor

I'd like to try taking this on.

@jordaaash
Copy link
Contributor

Closed by #23579.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants