All - Activity - plasmatech8 - Algorand
Cannot calculate suggested fees for inner transactions
Another thing, I do not think it is possible to calculate the num_bytes for inner transactions. (need to look into dryruns)
That may complicate things a little bit since you need to pay for the bytes of inner transactions too. And there is no way to get it easily/conveniently. Then again, transacti…
I have made an gh issue and I think it clarified a few things for me as well.
The fee parameter (fee-per-byte) returned by the API is indeed correct (it is zero until network congestion occurs). The fee-per-byte is NOT a problem.
Is this a bug?
As stated above, suggested_params.min_fee has no effect...
Actually, there might be a way to get the exact total fee for a transaction using dryruns. You would need to construct and sign the transaction twice though.
# Code example for setting fee parameters
suggested_params.fee = suggested_params.min_fee * 2
suggested_params.flat_fee = True
Looks good. I did not know about the flat fee.
I can see that if flat_fee = True, then fee is the total fee instead of the fee per byte (as I can see in py algosdk docs for the SuggestedParams).
Thanks for the reply. 🙂
The simplest solution for that is to set:
suggested_params.min_fee = suggested_params.min_fee * 2
I have been trying this, but the min_fee has no effect on whether the transaction is accepted or rejected.
For example, I have tried:
Delete Application Txn which contain…
I think I might be confusing myself a bit.
The real question might be:
How do I get suggested fee per byte, and why does the API return fee-per-byte of 0?
I have an application call which contains inner transactions, written in PyTEAL. I set the inner fee parameter to 0 so that the sender must pay for fees of the inner transaction and not use the funds held by the application.
InnerTxnBuilder.Begin(),
InnerTxnBuilder.SetFields(
{
TxnField...
}
)
Since applications have a max of 64 slots for global storage, I was imagining how smart contracts can efficiently store multiple asset IDs for later reference in the application code. Perhaps there is a better way to do this than storing the ID of every individual asset and using precious global storage.
When you send a transaction (i.e. a Payment transaction signed by escrow logic), you receive an error message back from the node saying something like: “assertion error pc=32”.
The problem is, I cannot easily figure out where pc=32 corresponds to in my TEAL code. Whatsmore, finding where in my PyTEAL/TEAL code might improve developer experience.