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

去中心化金融社区Publicado em 2022-03-31Última atualização em 2022-03-31

Resumo

当我们在区块链上提交交易时,我们通常会在区块链的原生代币中支付一笔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

Leituras Relacionadas

Microsoft CEO Satya Nadella's Latest Warning: Betting Entirely on a Single AI Model Hands Over a Company's Lifeblood

Microsoft CEO Satya Nadella warns that companies relying solely on a single AI model could jeopardize their survival. He argues that over-dependence leads to "vendor lock-in," where businesses risk ceding control over their core data, memory, contextual history, and AI usage patterns. This dependence essentially outsources a company's critical thinking and operational know-how to an external provider. The deeper a company integrates with one AI system—feeding it prompts, internal data, and workflows—the more it reveals its unique business methods and competitive edge. This accumulated knowledge could become accessible to the AI supplier. Furthermore, switching providers becomes extremely costly and complex, as companies would need to rebuild their entire AI-augmented workflow, memory, and tool integrations from scratch. Nadella's solution is "decoupling." Companies should separate their proprietary data, memory, and control layer (or "harness") from the underlying AI models. By retaining metadata from every AI interaction, businesses can preserve their operational "brain" or institutional knowledge. This allows them to flexibly use different AI models (e.g., from OpenAI, Anthropic, Microsoft) for specific tasks without losing their accumulated expertise. The core idea: companies can rent the smartest models available, but they must keep their own "brain" and operational control firmly in-house.

marsbitHá 19m

Microsoft CEO Satya Nadella's Latest Warning: Betting Entirely on a Single AI Model Hands Over a Company's Lifeblood

marsbitHá 19m

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.ruHá 29m

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

cryptonews.ruHá 29m

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.

marsbitHá 34m

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

marsbitHá 34m

Trading

Spot
活动图片