js-stellar-base icon indicating copy to clipboard operation
js-stellar-base copied to clipboard

[Discuss] Should we add the `resourceFee` in `sorobanData` to the `fee`?

Open overcat opened this issue 1 year ago • 0 comments

Describe the bug Currently, when we call TransactionBuilder.builder, regardless of whether sorobanData exists or not, the way we calculate the fee is op_count * baseFee. However, the meaning of the fee is the maximum stroops willing to be paid for this transaction. So I wonder if we should add the resourceFee in sorobanData to the fee?

What version are you on?

c4f9989991ac9592b01b16fc4e6a84b2e4d18070

To Reproduce See https://github.com/stellar/js-stellar-base/blob/c4f9989991ac9592b01b16fc4e6a84b2e4d18070/src/transaction_builder.js#L579-L681

Expected behavior See above. Additional context N/A

overcat avatar Jul 17 '24 00:07 overcat