gosdk icon indicating copy to clipboard operation
gosdk copied to clipboard

[FEATURE] Provide fee for transactions

Open Kishan-Dhakan opened this issue 2 years ago • 1 comments

Gosdk makes transactions with 0 fees, it won't work on mainnet. E.g:

func smartContractTxnValue(sn transaction.SmartContractTxnData, value int64) (hash, out string, err error) {
	return smartContractTxnValueFee(sn, value, 0)
}
txn, err := zcncore.NewTransaction(statusBar, 0)

Proposal: to use user provided fees and if not provided use min_fee as default.

See:

  • https://github.com/0chain/zwalletcli/issues/85
  • https://0chain.slack.com/archives/G01FYNN6DK4/p1645097379703449

Kishan-Dhakan avatar Feb 20 '22 19:02 Kishan-Dhakan

@bisakhmondal is working on it on https://github.com/0chain/gosdk/pull/623, but not responding to the changes, I'll check and close those PRs.

peterlimg avatar Nov 14 '22 05:11 peterlimg