I have the following function and don't want to manually sign the transaction every time it's called, how would I go about setting up a way of signing this transaction with an object. I've seen sendRawTransaction and account.signTransaction but can't figure out a way to implement these in my issue.
this.contractObject = this.contractObject = {from: this.account, gas:300000};
this.contract.methods.createCountry(arg1, 1rg2, arg3).send(this.contractObject, (err, res) => {
if (err) {
throw err;
} else {
console.log(res);
}
})
The following function gets added in a batch, I don't know if this will matter.