skalenetwork / validator-cli

A command line tool for validators and delegators. Written in Python.
https://skale.network
GNU Affero General Public License v3.0
10 stars 4 forks source link

Precision is lost for max-fee/max-priority-fee #378

Open DmytroNazarenko opened 1 month ago

DmytroNazarenko commented 1 month ago

Versions validator-cli: 1.3.1-beta.3

Steps to Reproduce/Description

  1. Execute transaction with validator-cli
  2. Mention "--max-fee" and "--max-priority-fee" field
  3. Check transaction on etherscan

Expected behavior maxFeePerGas and maxPriorityFeePerGas numbers must be the same as you mentioned in the command

Actual result maxFeePerGas number is a bit different (less)

More info ⬇️ executed command - sk-val validator withdraw-fee 0x06eb298545005800FCded90ed2A35824bE614808 --pk-file ./pk.txt --max-fee 50.123 --max-priority-fee 2.123

Transaction

logs - 2022-11-14 17:49:23,797 - skale.transactions.tools - INFO - Tx: withdrawFee, Fields: {'chainId': 5, 'gas': 231126, 'nonce': 45, 'value': 0, 'maxPriorityFeePerGas': 2123000000, 'maxFeePerGas': 50122999999, 'type': 2, 'to': '0xFD7C69ccD4cB2A58743628c264317d19D4E5Aa79', 'data': '0x1ac3ddeb00000000000000000000000006eb298545005800fcded90ed2a35824be614808'},

DmytroNazarenko commented 1 month ago

Migrated https://github.com/skalenetwork/internal-support/issues/530