【问题标题】:How to calculate transaction feeHow to calculate transaction fee
【发布时间】:2022-12-27 18:11:29
【问题描述】:

I want to empty my transactable balance,but alwalys got LackofBalance error.

I've used gas price* gas limit and ransfer_cost + create_account_cost + add_key_cost.full_access_cost by https://nomicon.io/GenesisConfig/RuntimeFeeConfig/ActionCreationConfig#transfer_cost to calculate fee and max transaction amount.None of them work well.

【问题讨论】:

  • Please post your code in your question rather than linking to it in an external site. Questions should be self-contained where possible.

标签: nearprotocol


【解决方案1】:

If your account is linked to the NEAR wallet, you can use Send MAX to transfer as much NEAR balance as possible. After that operation your account will be, in some sense, locked since you need to receive funds from someone to continue operating with it.

An alternative to gettingALLthe funds from your account is deleting it and set another account as the target where all funds should go. This can be done via near-cli using near delete tobedestroyed.near receiver.near

【讨论】:

    猜你喜欢
    • 2022-12-15
    • 2022-12-02
    • 2022-11-20
    • 2022-12-01
    • 2022-12-02
    • 2022-12-02
    • 1970-01-01
    • 2022-12-02
    • 2022-12-01
    相关资源
    最近更新 更多