2
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.

EIP-1193、EIP-1102の対応

Posted at

はじめに

久しぶりにMetamaskを触ったら色々とwarningが出ている。。
頻繁に追従させていかないと、なかなか難しいなと改めて感じました。

主には、eip-1193,eip-1102の対応が必要とのことで、

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1102.md

を見ながら変更しました。

今回のwarning

inpage.js:1 MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.
For more information, see: https://eips.ethereum.org/EIPS/eip-1193

inpage.js:1 MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.
For more information, see: https://eips.ethereum.org/EIPS/eip-1102

inpage.js:1 MetaMask: MetaMask will soon stop reloading pages on network change.
For more information, see: https://docs.metamask.io/guide/ethereum-provider.html#ethereum-autorefreshonnetworkchange
Set 'ethereum.autoRefreshOnNetworkChange' to 'false' to silence this warning.

EIP 1193

Most Ethereum-supported browsers like MetaMask and TrustWallet have an EIP-1193 compliant provider available at window.ethereum. For web3.js, check Web3.givenProvider.

EIP 1102

Metamaskはサイト読み込みをするときに、window.web3としてWeb3インスタンスを自動的に作りますが、
悪意のあるサイトが、自分のアドレスを抜くことができてしまうので、ユーザーの承認を入れるように変更が行われた。

Breaking Change: No Accounts Exposed by Default
EIP-1102: Preparing your dapp

おしまい

2
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
2
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?