SergeKireev / peekablock-extension

Peekablock is a browser extension which enables a user to see the effects of the transaction before they sign it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Peekablock

Icon

What it does

The extension includes:

  • a content script
  • a background script

The extension is activated when a user navigates to a web3 enabled web app (i.e. which uses Metamasks window.ethereum).

Peekablock uses the same mechanism as Metamask to attach to window.ethereum (specifically the function window.ethereum.request), and sends a notification to the background script without modifying the transaction sent to metamask.

When the page suggests a transaction to sign, peekablock forwards the transaction to an api to execute the transaction from the point of view of the user, and show the effects it would have if it were executed immediately on the blockchain.

Such an extension is critical to avoid scams, because it shows clearly and in a human readable manner the effects of what the user is signing.

What it shows

When a transaction is proposed for approval, peekablock shows the effects generated by the transaction on a forked mainnet, for now these events are supported:

  • Ethereum transfer
  • ERC20/ERC721 transfer
  • ERC20/ERC721 approval
  • ERC721 approval for all

Preview

Preview

Build || Contribute || Review

Please run the following commands:

  npm i
  npm run build
  web-ext build

Then run

    npm run set-chrome

or

    npm run set-firefox

for setting respectively chrome or firefox version

About

Peekablock is a browser extension which enables a user to see the effects of the transaction before they sign it

License:MIT License


Languages

Language:TypeScript 72.0%Language:CSS 12.9%Language:JavaScript 12.8%Language:HTML 2.3%