Zilliqa / gozilliqa-sdk

Zilliqa golang sdk
GNU General Public License v3.0
33 stars 29 forks source link

err: -8:Gas limit (1) lower than minimum for payment transaction (50) #93

Closed elvis-hp closed 3 years ago

elvis-hp commented 3 years ago

Hi, now I got an error when sending: "-8:Gas limit (1) lower than minimum for payment transaction (50)" It hasn't happened before. Please help me to check. Code send:

...
gasPrice := zs.provider.GetMinimumGasPrice().Result.(string)
...
tx := &transaction.Transaction{
        Version:  version,
        ToAddr:   toAddress,
        Amount:   amount,
        GasPrice: gasPrice,
        GasLimit: "1",
        Code:     "",
        Data:     "",
        Priority: false,
    }
teye commented 3 years ago

Hi, for payment transaction, the minimum gas limit is 50 instead of 1. This is a new change after the blockchain is updated last week.

Refer to this for more info: https://dev.zilliqa.com/docs/dev/dev-upgrade-v8/#3-payment-transaction-gas-unit-increase-from-1-to-50