如何使用MetaMask加速或取消未决交易

去中心化金融社区Published on 2022-03-31Last updated on 2022-03-31

Abstract

当我们在区块链上提交交易时,我们通常会在区块链的原生代币中支付一笔gas费。

当我们在区块链上提交交易时,我们通常会在区块链的原生代币中支付一笔gas费。

这一费用往往会根据市场条件自动调整,即区块链本身对区块空间的需求,但如果交易卡住了很长一段时间,它也可以通过向网络竞价来手动调整,以便更快地处理我们的交易。

在本文中,我们将解释如何加速长时间待处理的被卡住的交易,或者完全取消交易。

如何加快与MetaMask区块链交易

在MetaMask上发送交易后,一个新交易将被添加到队列中。将它添加到队列后,我们将看到两个按钮——speedup和cancel。

在单击SpeedUp按钮之前,单击交易并在区块链浏览器上查看交易详细信息。

Etherscan.io上的示例交易详情

请注意,“EstimatedConfirmationDuration”将显示在区块链上确认交易大约需要多长时间。

通常,如果交易是用市场费用发送的,它会很快被结算。但是,如果由于网络利用率突然飙升而花费的时间太长,那么我们可能希望在需要时加快速度。

点击“SpeedUp”按钮,我们就可以重新提交相同的交易,但会收取更高的gas费,这应该会让交易处理得更快。

我们会想要发送一个交易与gas费用,以便它在接下来的几个区块内被处理。要做到这一点,可以使用像Blocknative的gas估算器这样的服务。

Blocknativegas估算器

Blocknativegas估算器可以让我们看到推荐的优先费用和最大费用设置(我们没有EIP-559),以及在下一个区块(即15秒)内完成交易的概率。

要了解更多细节,我们也可以在同一页面上查看他们的Heatmap,以显示一天中特定时间的平均gas价格。

确保在我们发送更高优先级的交易之前检查这些资源,以避免支付过多的gas费用。

如何使用MetaMask取消交易

取消交易最简单的方法是在上面的交易窗口中选择“cancel”而不是“speedup”。

但是,交易取消只能在交易仍在网络上是待处理的情况下进行。如果交易已经被区块链确认,则不可逆。取消交易的更高级的方法是使用自定义的nonce。

转到MetaMask的Advanced设置并启用自定义交易nonce。

此外,启用Advanced中gas控制配置和覆盖默认gas设置。

打开这两个选项后,发送一个新交易。在我们的例子中,我们将发送一个0ETH交易给我们自己。

将我们现有的公共地址粘贴到搜索框中。

输入0ETH。

在我们的账户上查找区块链上的未决交易,并确定两件事:

交易的nonce(这里是73)

gas费和最高优先权费(这里是60和1.5)

输入与待处理交易相同的自定义Nonce字段。

通过点击Market按钮来调整gas。

选择“Advanced”,确保使用比上次交易更高的gas费。

单击Save,然后单击Confirm以发送交易。

这些步骤允许区块链比原始的待处理交易更快地接收我们的取消请求,因为gas量更高。

一般来说,这些交易要想成功,最好设置的最大费用至少比我们取消的交易高25%到30%。

Source:https://medium.com/stakingbits/how-to-speed-up-or-cancel-a-pending-transaction-with-metamask-4de3e8b08ea4

Related Reads

Miners Advised Not to Buy GPUs for AI and to Focus on Infrastructure

A founder at an energy investment forum advises bitcoin miners not to purchase GPUs for AI themselves, but to instead focus on infrastructure like power and data center space. Mike Alfred of Alpine Fox stated that while AI infrastructure demand is a long-term, 20-30 year trend, it presents a key choice for miners. The first, riskier model involves owning and operating GPUs, which requires financing expensive hardware that quickly becomes obsolete. The second, more conservative model is akin to real estate: providing colocation services where clients bring their own servers, and the miner sells space, power, cooling, and water. Alfred noted this model is easier to finance. Most existing bitcoin mining sites are difficult and expensive to convert for AI, as AI data centers require far higher construction costs, redundant fiber connections, backup power, complex cooling, and near 100% uptime. A hybrid model, where mining acts as a flexible load to use excess power during AI data center construction or from generation facilities, was discussed. However, participants concluded this is only viable with very cheap power; otherwise, developers are better off focusing solely on AI. Miners are increasingly being evaluated for their available power capacity and project portfolios rather than just bitcoin output. Panelists also warned of risks in the AI sector, predicting at least one major default or contract breach among AI tenants, lenders, or landlords before bitcoin's next halving in 2028.

cryptonews.ru7m ago

Miners Advised Not to Buy GPUs for AI and to Focus on Infrastructure

cryptonews.ru7m ago

Millisecond 'Pay-to-Cut': How Did Hyperliquid's Priority Fee Turn into a Multi-Million Dollar Business?

"Millisecond 'Paid Queue-Jumping': How Hyperliquid's Priority Fee Became a Multi-Million Dollar Annual Business" In traditional finance, high-frequency trading firms spend millions on infrastructure for millisecond advantages. Hyperliquid has translated this race onto the blockchain with its "Priority Fee" system, creating an open economic game for speed. This system auctions two types of priority: **Gossip Priority** for faster data feeds (via a Dutch auction every 3 minutes), and **Order Priority** for front-of-queue trade execution (users bid a fee for lower latency). This converts a hardware race into a transparent, market-priced mechanism. Since launch, this feature has generated over $5M in protocol revenue. Projected annualized buybacks from this income exceed $30M, accounting for ~7% of total protocol revenue. The demand stems from large traders and market makers on Hyperliquid, for whom milliseconds can mean the difference between profit/loss or avoiding liquidation. Market makers pay these fees as "protection" to ensure their orders execute first, which in turn improves liquidity for all users. Crucially, Hyperliquid internalizes Maximum Extractable Value (MEV) that typically leaks to external validators or searchers, creating a new revenue stream beyond trading fees. The mechanism also strengthens HYPE's tokenomics. While 97% of trading fees fund secondary market buybacks (via the Assistance Fund), Priority Fees are **directly burned**, adding a second deflationary engine. Furthermore, fees for order priority are deducted from users' undelegated HYPE balances, encouraging large traders to hold and lock up tokens, reducing circulating supply. However, a key challenge remains: balancing the speed needs of institutional players with fair market access for retail users, as those who cannot pay high fees may suffer worse slippage during volatility. In summary, Hyperliquid's Priority Fee is a novel model that monetizes latency, captures MEV for the protocol, and enhances its native token's value through burning and lock-ups.

marsbit12m ago

Millisecond 'Pay-to-Cut': How Did Hyperliquid's Priority Fee Turn into a Multi-Million Dollar Business?

marsbit12m ago

The Truth Behind Digital Banking: The Fragile Ecosystem Supporting 1.46 Billion Users

The article "The Truth About Digital Banks: The Fragile Ecosystem Behind 1.46 Billion Users" provides a data-driven analysis of the digital banking sector based on a verified list of 368 active neobanks as of July 2026. While these platforms collectively serve 1.46 billion users, with Asia (817 million users) and institutions like WeBank and Nubank dominating the landscape, the sector faces significant structural vulnerabilities. A key finding is that only 127 of the 368 neobanks hold full banking licenses. The majority operate atop third-party infrastructure providers like Banking-as-a-Service (BaaS) platforms, creating systemic risk where the failure of a single provider, as seen in past cases like Wirecard and Synapse, can jeopardize multiple consumer brands. Furthermore, the industry experiences a steady, quiet stream of failures, mergers, and shutdowns that often go unreported. The analysis also examines the adoption of artificial intelligence (AI), finding only 67 platforms (18%) have deployed AI at scale, with many innovators based in emerging markets like Nigeria and the Philippines. The infrastructure layer is highly concentrated, with 106 providers supporting the entire ecosystem of 368 consumer-facing brands. The article concludes with three predictions: the unlicensed gap will close through acquisitions or exits; an AI credit model is likely to fail in the next economic downturn; and a nascent but significant trend is the emergence of financial services designed for AI agents rather than humans.

marsbit28m ago

The Truth Behind Digital Banking: The Fragile Ecosystem Supporting 1.46 Billion Users

marsbit28m ago

Digital Asset Trading Platform Uphold Cuts 17% of Global Workforce Amid 'Crypto Winter'

Cryptocurrency trading platform Uphold has laid off approximately 17% of its global workforce, affecting 85 full-time employees and contractors. The cuts are part of a strategic shift to reallocate resources towards its rapidly growing corporate services business, as retail cryptocurrency trading activity has declined amid the ongoing market downturn. CEO Simon McLaughlin stated the company is restructuring after years of significant growth and remains confident in the long-term prospects of digital assets and blockchain technology. Founded in 2015, Uphold offers trading and custody services for cryptocurrencies, fiat, stocks, and precious metals. It has recently expanded to provide infrastructure for banks, fintech firms, and broker-dealers to integrate crypto services. The layoffs occur against a backdrop of a prolonged crypto market slump, with total market capitalization falling to around $2.1 trillion by Q2 2024. Factors include weakened trading volumes, reduced retail participation, interest rate hikes, geopolitical uncertainty, and net outflows from U.S. spot Bitcoin ETFs. Uphold clarified it is not shutting down its UK operations or any international offices. The company highlighted strong growth in its corporate platform and announced plans to evolve its consumer app into a broader blockchain-based financial assistant by 2026, offering U.S. stocks, tokenized securities, lending, credit cards, and DeFi yield opportunities.

cryptonews.ru28m ago

Digital Asset Trading Platform Uphold Cuts 17% of Global Workforce Amid 'Crypto Winter'

cryptonews.ru28m ago

Trading

Spot
活动图片