I am currently using the following method to interact with my contract and send a transaction:
contract.methods.myMethod(amount).send({
from: address,
to: CONTRACT_ADDRESS,
value: String(totalCost),
});
I did notice the .send does take the following parameters:
gasPrice - String (optional): The gas price in wei to use for this transaction. gas - Number (optional): The maximum gas provided for this transaction (gas limit).
However, i dont see any parameter to adjust the priority fee. Is there any way to pass this trough when making a transaction this way?
Im firing the transaction from a nodejs app and is for personal use only, so i have set a private key to avoid having to sign etc. But the only thing im missing now is to set a pre-defined priority fee.
From another post over at https://ethereum.stackexchange.com/questions/11018/
Miners will Prioritize the transactions with a higher gas price not a gas value (how much gas are you providing to be used to execute your transaction). the miners set a gasprice(the gas price you are willing to pay in ether for each unit of gas) whiting the network if you send a transaction with a price below your transaction will not be proceeded otherwise more you raise your gas price more you Prioritize your transaction. your transaction fee = consumed_gas * gas_price. your function consumes n gas you get refunded gas_value-n;