ProvableHQ / sdk

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

Add automatic minimum fee calculation to transactions. #900

Open iamalwaysuncomfortable opened 1 month ago

iamalwaysuncomfortable commented 1 month 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