ProvableHQ / sdk

A Software Development Kit (SDK) for Zero-Knowledge Transactions
https://provable.tools
GNU General Public License v3.0
593 stars 471 forks source link

Add automatic minimum fee calculation to transactions. #900

Open iamalwaysuncomfortable opened 4 months ago

iamalwaysuncomfortable commented 4 months ago

Motivation

Currently the SDK does not auto-calculate the minimum fee to execute a program. This should be automatically calculated upon execution of a transaction for optimal UI.

Implementation

The fee parameters in program deployment and execution methods aleo-wasm should be all changed to priority_fee and include the calculation of the base fee within the function body: https://github.com/ProvableHQ/sdk/blob/7e48e57c9b462c45bf31507f61b60983e21f08bb/wasm/src/programs/manager/execute.rs#L154