Cum accelerezi sau anulezi o tranzacție în așteptare
Does this article need to be translated?
Submit translations, corrections, and suggestions on GitHub, or reach out on our Community forums.
Când trimiți o tranzacție pe Ethereum sau pe o rețea compatibilă, o parte din gas-ul pe care îl plătești este o ofertă către rețea pentru a procesa tranzacția mai repede - acest element este cunoscut sub numele de taxă de prioritate.
Although MetaMask will assist you by calculating a total gas fee likely to have your transaction picked up, you can end up waiting a long time if you submit with a low gas price. For advice on what gas prices will result in a transaction being finalized in a reasonable amount of time, please refer to sources such as Etherscan's gas tracker, or a similar tracker for whichever network you're using.
Additionally, there are sometimes circumstances where something goes wrong, and a transaction is just stuck, or pending for a very long time.
No matter how you got to this point, there are a few different ways to address it.
Before you take any further action, your first step should be to exit and close your browser completely, reopen it, and unlock MetaMask (on mobile, just close the app and reopen it). If that doesn't solve the problem, continue with the following:
Speeding up a transaction
Try one of the options below:
- Wait until the network is willing to process transactions at this price
- Dacă nu ai făcut asta deja, apasă pe butonul pe care scrie „Accelerează (Speed Up)”. This will let you re-submit the same transaction, but with a higher gas fee that should allow the transaction to be processed faster. Since this process re-uses the same nonce as the original, you do not need to pay for gas twice.
Bear in mind that speeding up the transaction will increase the amount you're spending for the transaction.
Canceling a transaction
Method 1: In-app cancellation
If you haven't done this already, to cancel the transaction, simply select Cancel, as in the screenshot above. Please note, a cancellation can only be attempted if the transaction is still pending on the network. Transactions that have already been confirmed cannot be reversed.
Metoda 2: Nonce personalizat
To make the custom nonce box visible, you need to turn off the Smart Transactions feature. You can do this by going to "Advanced Settings" and toggling the feature off. After clearing the pending transaction, you can easily re-enable Smart Transactions by toggling it back on.
This process involves sending a new transaction with the same nonce (an identifying number for every transaction, derived from the phrase 'number only used once'). The transaction does not actually have to have any value — e.g. you could send 0 ETH. What matters is that you pay enough gas for the network to prioritize it.
When using this method, you will need to work backwards from the oldest pending transaction in the queue that you want to cancel. For example, you cannot attempt to cancel a transaction with a nonce of 10 before canceling nonce 9.
Note also that you may be able to cancel multiple transactions at once if they have the same nonce. Since a nonce—by definition—can only be used once, cancelling one of them will cancel all that have the same nonce.
The screenshots below were taken at different times, so the gas fees shown in them can vary, even from step to step. Don't let this put you off! When you do this yourself, MetaMask will automatically update in real time to show market rates.
- Extensie
- Mobil
- In advanced settings, turn on Customize transaction nonce. You'll need this turned on so you can send a replacement transaction (using the same nonce). Find out how to locate a transaction's nonce here.
- Efectuază o tranzacție nouă. Tranzacția nouă trimite-o CĂTRE tine, adică la adresa ta publică MetaMask. Completează „Nonce Personalizat” cu același nonce ca tranzacția care este încă în așteptare:
- Next to the estimated fee on the transaction confirmation screen, you'll see a pencil icon to edit the fee. Click the edit icon and then select 'Advanced' at the bottom:
Pentru a te asigura că solicitarea ta de anulare este preluată cu prioritate și înainte de tranzacția originală, va trebui să plătești mai mult pentru gas. On this screen, follow these instructions:
- Set your gas limit comparable to or slightly higher than your original transaction.
- Setează ** taxa de prioritate** cu cel puțin 10% mai mare (în Gwei) decât taxa de gas a tranzacției inițiale (cea aflată în așteptare) (de exemplu, dacă tranzacția a avut o taxă de gas de 30 Gwei, setează taxa maximă de prioritate în tranzacția de înlocuire/anulare la 33-35 Gwei).
- Asigură-te că taxa maximă a ta este cu cel puțin 30% mai mare decât taxa maximă a tranzacției pe care o înlocuiești. De exemplu, dacă taxa anterioară a fost de 150 Gwei, seteaz-o undeva la 200 Gwei, de data aceasta.
Consultă un gas tracker, cum ar fi cel de la Etherscan pentru îndrumări cu privire la taxele maxime recomandate.
- În Setări > Avansat, activează „Personalizează nonce-ul tranzacției”.
-
Efectuează o tranzacție nouă. În tranzacția nouă, trimite CĂTRE tine, adică la adresa ta publică MetaMask. Set the nonce to the same nonce as the transaction that is still pending.
Pentru a găsi setarea de nonce personalizat în aplicație, accesează ecranul de confirmare a tranzacției, care apare după ce ai introdus numărul de tokeni și destinatarul. Apasă pe „Editează” pentru a face modificări:
- Acum trebuie să te asiguri că setările tale de gas sunt configurate astfel încât tranzacția de înlocuire să fie procesată. În ecranul de confirmare a tranzacției, apasă pe valoarea evidențiată de gas:
Now access 'Advanced options' from the menu that appears.
-
De aici, poți ajusta gas-ul cu precizie pentru a te asigura că tranzacția ta este preluată. Acum vei vedea un ecran care arată astfel:
De aici, reglează setările de gas. Follow these instructions to make sure your transaction is picked up:
- Set your gas limit comparable to or slightly higher than your original transaction.
- Setează taxa maximă de prioritate cu cel puțin 10% mai mare (în Gwei) decât taxa de gas a tranzacției inițiale (cea aflată în așteptare) (de exemplu, dacă tranzacția a avut o taxă de gas de 30 Gwei, setează taxa maximă de prioritate în tranzacția de înlocuire/anulare la 33-35 Gwei).
- Asigură-te că taxa maximă este cu cel puțin 30% mai mare decât taxa maximă a tranzacției pe care o înlocuiești. De exemplu, dacă taxa anterioară a fost de 150 Gwei, seteaz-o undeva la 200 Gwei, de data aceasta.
Consultă un gas tracker, cum ar fi cel de la Etherscan pentru îndrumări cu privire la taxele maxime recomandate.