0

Hello I have a problem when I need to accelerate transaction in Metamask, I want to increase the gas fee price but it`s not working...

As u can see in image I run script to change value but metamask back to previous value, its also have spin inside this input value.

How to make this work please help?

The code that I`m using to change the value is:

document.querySelector("#popover-content > div > div > section > div > div > div.edit-gas-display > div.edit-gas-display__content > div.advanced-gas-controls > div:nth-child(3) > label > div.numeric-input.numeric-input--error > input[type=number]").value = 65

I`m new in JS so have another way to make it change this value?

Contact me please i need help.

enter image description here

1 Answer 1

0

You can do this is when you interact with smart contract method in js their specified gasprice and gaslimit with method.

You try this:

const transactionParameters = {
  nonce: '0x00', // ignored by MetaMask
  gasPrice: '0x09184e72a000', // customizable by user during MetaMask confirmation.
  gas: '0x2710', // customizable by user during MetaMask confirmation.
  to: '0x0000000000000000000000000000000000000000', // Required except during contract publications.
  from: ethereum.selectedAddress, // must match user's active address.
  value: '0x00', // Only required to send ether to the recipient from the initiating external account.
  data:
    '0x7f7465737432000000000000000000000000000000000000000000000000000000600057', // Optional, but used for defining smart contract creation and interaction.
  chainId: '0x3', // Used to prevent transaction reuse across blockchains. Auto-filled by MetaMask.
};

// txHash is a hex string
// As with any RPC call, it may throw an error
const txHash = await ethereum.request({
  method: 'eth_sendTransaction',
  params: [transactionParameters],
});

You can read more about it form Metamask Docs

Your Answer

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

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