Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send a zero-fee transaction? #90

Closed
zenghq3 opened this issue Aug 21, 2020 · 1 comment
Closed

How to send a zero-fee transaction? #90

zenghq3 opened this issue Aug 21, 2020 · 1 comment

Comments

@zenghq3
Copy link

zenghq3 commented Aug 21, 2020

I see a zero-fee transaction in the block explorer
https://explorer.thetatoken.org/txs/0x801c54e531ef2b96cbfdf69dc539a6d0d1129b89cb527a3e46277df3a765a223
But I use the privatenet, assembled the transaction and got
{"code":-32000,"message":"Insufficient fee. Transaction fee needs to be at least 1000000000000 TFuelWei"}
This is my transaction structure

inputs := []types.TxInput{{
		Address: from,
		Coins: types.Coins{
			TFuelWei: new(big.Int).SetUint64(0),
			ThetaWei: theta,
		},
		Sequence: uint64(seq),
	}}
	outputs := []types.TxOutput{{
		Address: common.HexToAddress(toAddress),
		Coins: types.Coins{
			TFuelWei: new(big.Int).SetUint64(0),
			ThetaWei: theta,
		},
	}}
	sendTx := &types.SendTx{
		Fee: types.Coins{
			ThetaWei: new(big.Int).SetUint64(0),
			TFuelWei: new(big.Int).SetUint64(0),
		},
		Inputs:  inputs,
		Outputs: outputs,
	}

Can you tell me how to send a zero-fee transaction? And tell me the difference between Theta and TFuel, the document link is also OK. Thanks

@zenghq3 zenghq3 closed this as completed Aug 21, 2020
@ygcool
Copy link

ygcool commented Nov 8, 2021

hi, Can I add your contact information? qq or vx or telegram

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants