0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

specified type "0x0" but including maxFeePerGas and maxPriorityFeePerGas requires type: "0x2"

Posted at

昨日動いていたプログラムが突然動かなくなって焦った。

Dappを作っていて、Txを発行したところMetamaskから以下のエラーが届いた

Invalid transaction envelope type: specified type "0x0" but including maxFeePerGas and maxPriorityFeePerGas requires type: "0x2"

MetaMask_Notification_と_display_property_and_staking_-_CodeSandbox.png

はじめは、コントラクトやDappのコードを怪しんだが、特に動いていた時から変更はしていなかったので、まったく原因がわからず焦った。

以下の記事から原因がわかったのだが、ChromeにアドオンしているMetamaskが最新版になっており、DappのWeb3.jsのバージョンが古く、そのWeb3.jsに最新のMetamaskが対応していないのが原因でした。

Web3.jsのバージョンを上げて問題は解決しました。

Chromeにアドオンしているアプリケーションのバージョン管理はしていないので、いつの間にか上がっていたのでわからなかった。DappでMetamaskを内包するとか無理なのかな…?そうすれば、この問題は起きないと思うんだけど

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?