2

I am attempting to add a tip to a transaction in the following manner:

const batch = await api.tx.utility.batch([...]);
batch.tip = 1;

It appears that tip is a read-only property and I'm receiving an error. How may I add a tip to this transaction?

1 Answer 1

4

Your batch method has a signAndSend function attached to it. signAndSend takes in Partial<SignerOptions> as a second parameter where you would attach your tip. It would look like the following:

const batch = await api.tx.utility.batch([...]).signAndSend(from, { tip });

SignerOptions can be found here.

The following methods that take in SignerOptions can be found here for SubmittableExtrinsics

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.